A Khalifa is someone designated by someone in authority to represent him amongst the followers of that authority. Thus:
Khalifatullah: Designated by God on earth.
Khalifa-e-Rasul: Designated by Prophet
Khalifa: Designated by a spiritual authority such as a SUFI Pir.
It is apparent that right to KHILAFAT in Islam comes from God and nobody else. It has been hijacked in our history through recourse to a selfish interpretation of "Qur’an: had declared: 38.42 ( اَمْرُهُم شُوْرٰی بَينَهُمْ-- the affairs of the Muslims are run on the basis of their mutual consultation”, and hence the confusion within Muslim.
There is this verse dealing with this issue:
“Allah had promised to those among you who believe and do good works that He will surely make them Successors in the earth, as He made Successors from among those who were before them; and that He will surely establish for them their religion which He has chosen for them; and that He will surely give them in exchange security and peace after their fear: They will worship Me, and they will not associate anything with Me. Then whoso is ungrateful after that, they will be the rebellious. (Surah Al-Nur, Verse 55).”
It is He who appoints a Khalifa as well. He chooses the person who is most eligible to become a Khalifa.
Khilafat establishes the authority of Allah on earth, and the Khalifa strives to uphold that authority within the community of followers. For the believers, Khilafat is an embodiment of Allah’s Unity, as they choose to take divine authority through the person of the Khalifa. The believers partake of the blessings of Khilafat by holding firm to their faith and practices, united under him.