Khan means "ruler" or "commander" in Turkic and Mongolic Languages.
It may be from an Altaic language, probably a Mongolic language like Ruanruan.
Presently, khans exist mostly in South Asia, Central Asia and Iran.
A female khan is called a Khatun or Khanum.
Khagan means 'Khan of Khans' but is often (incorrectly) 'shortened' to Khan. This is similar to how the Persian Shahanshah, 'King of Kings', is usually simply called the Shah. Genghis was also called the 'Great Khan' like how Ottoman Padishah was called the 'Great Sultan'.
Khans rule over Khanates. Khagans rule over Khaganates.