This is a great question to ask and a really frustrating one to answer, for basically the same reason: the precise definition of each of these terms differed from place to place from time to time—we can distinguish in the thirteenth century between the Abbasid caliph and the Ayyubid and later Mamluk sultans, and the Mongol khan and ilkhan, but what are we to make of the Ottoman "Sultan Suleiman Shah Han" the "Inheritor of the Great Caliphate" in the sixteenth?
So let's start at the beginning. Before the rise of Islam, the standard word for king was "malik," from a root denoting ownership and rule. This is the term used in the fourth-century Namāra epitaph of Imruʾ al-Qays, for example, as well as for kings (like Pharaoh and Solomon) mentioned in the Qurʾan and several hadith. For early Muslims, however, there existed a crucial distinction between khalifat ("caliph") and malik: the one was divinely-sanctioned, the other a symbol of man's hubristic striving to replace divine order with his own authority. Malik continued to be applied to non-Islamic monarchs, but within the Islamic world it was a term of abuse—most famously applied to the Umayyads in criticism of their worldly and hedonistic rule. In the tenth century it saw something of a revival after it was adopted by the Buyid emir ʿAdud al-Dawla and the Samanid Nuh b. Nasr; in fact, the title became so popular among non-Arab rulers that some historians have speculated its ubiquity led to depreciation and abandonment by the Ottoman period. This shift from extremely negative to neutral—even positive—connotations is perhaps one of the most dramatic examples of how titles changed in meaning over the centuries, but it's certainly not the only one.
The caliphate is another great example. I've discussed the changing definition of the caliph title in more depth in a previous response (here), so I'll be relatively light here. The word khalifat literally translates to "successor" or "deputy," and often means a position of successorship to Muhammad. The question here was: is this successorship in a political sense (as is implied by another common caliphal title, "Commander of the Faithful")? Or does it mean successorship as head of the Muslim community? To make matters complicated, some versions of the title circumvent Muhammad entirely: a common label for Sufi leaders was khalifat Allah, the viceregent of God (as opposed to khalifat rasul Allah, successor to God's messenger). Hüseyin Yılmaz, one of the most important historians of the Ottoman caliphate, has argued that the Ottomans drew from the Sufi tradition when they took on the title. So here the spectrum runs from "political and spiritual authority, successor to Muhammad" to "purely spiritual authority, viceregent of God."
(It's worth noting in passing that even when the definition of the caliphal title wasn't in question, the qualifications of its bearer were a major issue. This was the major cause of several doctrinal splits between Muslim communities, including the Sunni-Shiʿa divide.)
Like khalīfa, some of the issues with sultan's meaning stem from the fact that it was basically appropriated as a religious title by medieval Sufis—the most famous of whom is probably Rumi's son Sultan Walad. In the political sphere, the main issue is that it eventually ceased to exclusively denote independent temporal authority. Originally, the term referred to independent rulers outside of caliphal authority (though often confirmed in their rule by the caliph, much as kingship in Western Europe had a special cachet associated with papally-sanctioned coronation), as well as the major temporal power within the caliphal domains. By the early modern period, however, it was also applied to princes, princesses, and government officials. This devaluation occurred even within the Ottoman Empire, whose ruler is often referred to as "the Sultan"! (By contrast, titles like shāh and padışah were never used to refer to any political position other than independent ruler.)
Finally, we come to khan, which—like all the rest—encompasses multitudes. There were khans before the Mongols, of course, but the striking success of the Mongol World Empire left a lasting impression on the title's use in the Islamic world (and beyond). For better or worse, the title and the charisma of steppe rulership became intimately tied up with the descendants of Chinggis Khan. Almost all of the famous khans in Islamic history—the Crimeans, the Shaybanids, the Kazakhs, and of course the Golden Horde—claimed Chinggisid descent, and made great use of those claims to legitimize their rule. By contrast, qarachu (commoner) claims to the khanate were looked at with grave suspicion: even Timur initially ruled through Chinggisid puppet khans, and when he disposed of them had to be content with the title of amir. In Crimea and Central Asia (and to a lesser extent, the Ottoman Empire, where Chinggisid concepts of universal rule and dynastic charisma were embraced even as Chinggisid descent was discarded), then, "khan" meant "ruler descended from and in the tradition of Chinggis Khan and his successors."
But, as I said, this is only the famous khans. One of the issues is that khan is often linguistically paired with a related but superior title of khaqan: in areas where Chinggisid descent wasn't a major issue, then, it was possible to use the term to describe high-ranking governors and tribal rulers. Like sultan, this often included princes of the ruling dynasty sent off to oversee appanages throughout the realm: the Iranian khanates of Erevan and Nakhchevan, established in the eighteenth century, are great examples of this. (Also like sultan, this devaluation of the title was more common in Iran than elsewhere.)
———
Could you follow all that? It's confusing, I know. To recap:
Caliph can mean "supreme temporal and religious authority" or "supreme religious authority" or "respected Sufi leader";
Sultan can mean "supreme temporal authority" or "respected Sufi leader" or "governor or prince";
Khan can mean "supreme authority derived from steppe, and often specifically Chinggisid, models of kingly legitimacy" or "governor or prince."
———
The good news is that a bunch of these definitions only matter in pretty specialized niches! For the educated layman's purpose, you can generally treat caliph as (before the 11th century) "divinely-sanctioned supreme temporal and religious authority" or (11th century and later) "divinely-sanctioned supreme religious authority," sultan as "independent temporal authority on the Islamic model," and khan as "independent temporal authority on the steppe/Chinggisid model," and you'll be fine. But for specific cases, especially once you hit the ~14th century, the expanding and overlapping semantic fields make context really important for determining what exactly a given title means.
Here is a response from u/crackdtoothgrin answering a similar question about the difference between a Sultanate and a Caliphate