Borrowed from Bulgarian кота́к (koták), a by-form of котара́к (kotarák). For sense 2, compare Tatar кутак (qutaq) and Kyrgyz коток (kotok).
Practice speaking and memorizing "kotak" and many other words and sentences in Turkish.