Medieval kings were not divine-right kings; that idea started only in the seventeenth century. Certainly medieval kings were not gods or even gods-in-waiting, like the original Roman emperors or the pharaohs of ancient Egypt.
But they still were anointed with holy oil at their coronations, ever since Pippin the Short (father of Charlemagne). And as semi-sacral beings, they had certain God-given abilities. The French kings of the High Middle Ages were believed to be able to cure scrofula with the royal touch.
Scrofula was a term used then for a variety of skin diseases, though the term now is restricted to certain infections of the lymph nodes, often associated with tuberculosis, in which the sufferer has black or purple growths on their neck. Sounds nasty, and it is.
From at least the eleventh century on, French kings were assumed capable of healing this disease, which was therefore sometimes called the King's Evil. People with skin diseases (and at this distance one can't really say if they all really had scrofula or something else) would petition for healing, and at certain times the king would allow them to approach and be touched with the king's touch. Modern medicine may be rightly skeptical of how this could possibly lead to healing, but people certainly believed that it worked, because they kept coming back.
For a long time only the French kings could heal with their touch. The English kings, the former dukes of Normandy, had nothing similar. For that matter, the French kings were always treated with more reverence by their subjects than were the English kings, who couldn't even get along with their own family members and whose funerals sometimes degenerated into disgusting farces.
But this changed in the late Middle Ages, when several English kings married French princesses and thus gave their descendants the Royal Touch. Right through the early modern period, both French and English kings would "touch" scrofula sufferers. (The German kings were never so blessed.)
The practice was eventually ended in England in the seventeenth century (the kings decided the practice was "too Catholic" in a country where Church of England was determinedly Protestant) and in France in the eighteenth century.
These days no one thinks of European or American rulers as semi-sacral. Imagine the security issues if a president was believed to be able to cure diseases with his touch and had sick people lining up for treatment.
For more on scrofula and the kings, there's a whole book on the topic by the great French historian Marc Bloch, written in the first half of the twentieth century but still in print, The Royal Touch.