Khalifa or Khalifah is a name or title which means "successor", "deputy" or "steward". It most commonly refers to the leader of a Caliphate, but is also used as a title among various Islamic religious groups and orders. Khalifa is sometimes also pronounced as "kalifa". There were 4 khalifas after Mohammed died, beginning with Abu Bakr. This was a difficult decision for the people to make, for no one except Mohammed had ever thought with foresight about who would rule after he would die. The Khilaafat (or Caliphate) was then contested and gave rise to the eventual division of the Islamic Umma into two groups, the Sunni and the Shi'a who interpret the word, Khalifa in differently nuanced ways.
The earliest Islamic uses include 'Khaleefa(ḥ)' in The Holy Qur'an, 2:30, where Allah commands the angels to bow down to Adam which more clearly guides to the root Classical Arabic meaning of the word as "Vicegerent", or divinely connected representative of Allah in the human form as a mercy to mankind. See also how this meaning interacts with the word, Shirk (associating a partner or partners to Allah ) by (for example) bowing down to them (in this case, Adam) with reverence. "Vicegerent", therefore, is more at "divinely-guided spokesman" than "deputy" in this context and leads to the discovery of the role of Imam in Islam, from the Shi'i or Shi'a point of view where, it is claimed, the spiritual Khilaafat or designation of Khaleefa in this meaning of spiritual and temporal guide falls upon the first Imam, 'Ali ibn Abi Talib, "the favourite" (who received his mission from his cousin the Prophet Muhammed himself but who also conceded the Khilaafat to the election and claim of the politically more powerful and more popular leader and his senior, Hadhrat Abu Bakr). In the Shi'i tradition, however, the dissolved claim to the Khilaafat by 'Ali thereafter crystallised into Imamat which continued with his descendants after him through appointment by nass, or designation).