Originally Persian. Literally means a person whose brain is a pussy, Kos (pussy) Maghz (brain).
It is used for a person who does stupid things or have stupid thoughts. Equals "dick-head" in English.
I can't believe you're gonna swim in that lake full ofcrocodiles. You're such a Kosmaghz.
Hey Kosmaghz, nobody adds salt to his coffee like how you do!