In 1077 two great lords met the castle of Canossa in Italy. One stood high on the fortress walls, dressed in fabulous regalia. The other stood far below, in inches of snow, with only a rough wool tunic to protect him from the wind. After freezing and starving days and nights, the humiliated figure in the snow was dragged inside with his confiscated crown, to beg for mercy and forgiveness.
The man on his knees was Holy Roman Emperor Henry IV, 'the heir of Charlemagne'. His tormentor from the walls: pope Gregory VII. Machiavelli describes this event as feeling the sharp thrust of spiritual weapons.
How can a man with no army and few lands break a great kingdom, or even empire, to pieces?
First we should recognise that the medieval papacy did rule over a considerable state at times; it varied in size and allegiance considerably but was nonetheless much larger that today's Vatican City state. As such, popes could and did field armies - Julius II 'the Warrior' even campaigned in full armour. However, your question is pertaining to the much more powerful and yet equally intangible might of religious authority. It was exactly this which the papacy wielded more effectively than any sword or cannon.
The great pillars of medieval secular power, such as the Holy Roman Empire, relied on systems of patronage and entitlement which also fostered a network of rivalries and pretenders. It was the same for any prince and his realm. The pope could exploit this by declaring a prince, in this case the Emperor, as false and therefore undeserving of the fealty and allegiance of his subjects. Look at what pope Gregory declared to Europe in Henry IV's case:
On the part of God the omnipotent, I forbid Henry to govern the kingdoms of Italy and Germany. I absolve all his subjects from every oath that they have taken or may take; and I excommunicate every person who shall serve him as king.
Three things are important to notice here. First, that the pope claims to speak as a direct representative of God on Earth, which for the believing faithful of Christendom is its own validation and justification for action. Second, that oaths sworn to Henry, for payments of money, for truces or ceasefires, for obedience and loyalty, are all now void. Third, those continuing to support Henry are excommunicated - the withdrawing of the holy sacraments places the eternal soul of the Emperor's subjects in a very perilous position.
Why not just ignore these threats from a man with no army of his own? Unfortunately for Henry, even if he did not take the pope seriously there were many who did. Slowly but surely his vassals sought to distance themselves from him and his allies withdrew their support. The Emperor's own mother and former regent, Agnes of Poitou, supported the pope.
In this way, Gregory need not raise a single sword himself: Henry would be abandoned by his own men for fear of damnation and attacked by any rival or pretender using the pope's words as their pretext. It was a strategy which was precisely as effective as the authority of the speaker, which in this context was effective enough to put the Emperor, broken and alone, ankle-deep in snow and prostrate in front of the pope, his crown and regalia forfeited.
Ultimately, Henry defeated his rivals and retained his throne, while it was Gregory who died in exile. However, memory of this struggle and the incident at Canossa would inspire similarly bold papal tactics in the future. This other spiritual weapon, worth mentioning here, was Interdict.
There had been a torrid relationship between king John of England and the papacy for some time, owing to him twice marrying without dispensations from bethrothal. The final straw came when the king defied pope Innocent III and installed his own candidate for the Archbisopric of Canterbury (the topic of investiture rights for bishops was a sore point between Rome and the secular princes for much of this period). Now, Innocent declared the whole country of England to be under interdict - perhaps the most severe punishment in the papal arsenal.
England had 8,000 churches and now every one of them locked their doors. There was no mass and no marriage. The bells didn't ring nor were the sermons preached. The country had no communion. 'The dead were placed in their shrouds and buried like dogs'. As a land now essentially Pagan, England would also make a fine target for crusade. The pope suggested this same idea to Philip of France: both he and any others invading England would receive the papal indulgence of a crusader.
Now besieged in his own kingdom, hated by the faithful of his towns and cities and staring down an invasion across the Channel, John caved and begged the pope for peace. On 15th May 1213, the king of England not only agreed to peace with the pope and the full restoration of church privilege and property, but he assented to holding the kingdom as a vassal of the papacy and that he and his heirs would rent back England from Rome for 1000 marks a year. In this way, another secular prince's humiliation was complete, again without the pope having to take to the field.
There is an enormous amount to explore here, because the historical period is so long, the conflicts so broad and the motivations so deep, but hopefully the details of events above give you some insight into the power which a pope could wield in a religious populace.
Edit: Typing and format.
Edit II: If the above case studies have whetted your appetite for such secular and spiritual wranglings, then may I suggest you read about Innocent III's other princely targets: Raymond VI of Toulouse, excommunicated in 1208 before the anti-Cathar 'Albigensian Crusade' and Otto IV, Holy Roman Emperor, who died defeated and stripped of his titles in 1218, after his own excommunication.
For an introduction to the topic, which is both accessible and insightful, try Vicars of Christ by Peter de Rosa (1988).
This question is difficult to answer in that “Medieval Kings” covers over a 1000 years of history. As such, there are a lot of potential reasons why temporal rulers would feel the need to pay attention to the pope. Given that the scope of the question is so large, I will restrict my answer to the 11th century and the Investiture Conflict.
The investiture Conflict was a clash of authority between the Holy Roman Emperor and the Pope over who had the right to appoint bishops. Kings claimed that since the bishops were ruling large bishoprics in their realms, they had the right to nominate bishops. On the other hand, Popes claimed that as representatives of Christ and St. Peter, they alone had the authority to invest someone into a spiritual office.
It might sound to us as though Kings were obviously in the wrong here. After all, why would a political ruler get to choose a spiritual leader? The answer is that in the many centuries preceding the 11th , Kings often got involved in the question of who got to be the next bishop. In fact, the papacy was almost always a non-factor in these decisions before the 11th century. In Gregory of Tour’s History of the Franks, written in the 6th century, Gregory mentions a number of successions for many bishoprics in Francia. Sometimes, the spiritual leaders in the see elected a new leader, sometimes the old bishop appointed a new one before he died. Often the king stepped in and propped up a new bishop while sometimes it was another powerful lord who paid for a relative to become the next bishop, (This is called Simony, and while it is a sin it was often practiced and just as often overlooked). Sometimes a mix of all three happened. However, the papacy was almost never involved.
While there is a 500 year gap between the 6th and the 11th century, the general pattern of succession held true, with an increased number of successions decided by powerful lords and kings. Fast forward to the 11th century. In central Europe at this time there were two interests who formed a sort of informal alliance, Holy Roman Emperor Henry III and the Reformer party of the Church. Henry III wanted what many rulers both before and after him wanted, a way to increase his control over his kingdom and minimize the influence of the nobles in his kingdom. The reformers sought to reform the state of monasticism, which had grown lax over the hundreds of years most of the monasteries in Europe were around for, and to put an end to simony. These two parties worked together to achieve their mutual goals. Henry III invested members of the Reformer party into powerful landed and church positions under his control, which not only increased his administrative grip on the Empire, but also limited the influence his own nobles had by preventing them from buying office for their relatives. The reformers then used their new positions to advance their own agenda of reform.
When Henry III died in 1056 his son Henry IV was only 7 years old. Many in the nobility used Henry’s minority to recover or attempt to recover privileges they lost under Henry III. As such Henry IV’s early reign was beset by rebellions and revolts, particularly from the Saxons. While Henry IV was still a boy, the reformers continued to push forward with their agenda of reform across Europe. In 1073 Gregory VII became pope. Historians have many different things to say about Gregory VII. Some say that he was an intense micromanager or a zealot, but it is sufficient to say that he was a man who had an idea of how the work should work, what his place in the world was, and those who did not share his authority over certain matters not only had no business engaging in these matters, but were acting against god. In other words, Gregory began to advance the idea that Simony was not just paying for church office, but receiving it from someone who was not able to bestow it. As the representative of Christ on Earth Gregory believed popes were the only ones who were capable of bestowing the spiritual powers of church office upon bishops, and as such only the pope could invest a bishop. (Gregory is also an important historical figure in that almost the entire corpus of his letters still survive to this day).
On the other hand, Henry IV continued to do what rulers had done for centuries before him and invested men loyal to him into many powerful bishoprics. Gregory wrote a number of letters, which at the time were not like the personal correspondences we send each other today but were meant to be read for many people and circulated, denouncing Henry for Simony. Henry replied with letters denouncing Gregory, accusing him of “leading people into confusion” which again might sound strange to us now but Henry had only been following a practice with years of precedence while Gregory was introducing a new idea. The situation came to a head when Gregory attempted to invest one of his court clerics, Teadald, into the Archbishopric of Milan, which was already contested between two factions in the city. Gregory called Henry a simoniac and Henry fired back by proclaiming Gregory to be a false pope, after which Gregory responded by excommunicating Henry. It must be remembered that while excommunication during this time was not only a spiritual punishment, it was also a social one. Christians in good standing with the church were not to associate with an excommunicate, nor did they owe any allegiance to one, nor could an excommunicate legitimately hold lands or titles.
While Henry had put down the Saxon rebels shortly before Gregory became Pope, he had failed to completely crush them. When they heard that the pope had excommunicated Henry, those who still had a will to fight rose up in an attempt to overthrow him. Many other German lords who were dissatisfied with Henry also revolted, and Henry quickly found himself facing coalition of powerful German nobles seeking to depose him. Gregory arranged a council for the spring of 1077 in southern Germany for the nobles and Henry to settle their differences. Henry sensed that his enemies would prevent him from reaching the council, so in the winter of 1077 he snuck across the Alps to the fortress of Canossa, where Gregory was currently staying on his journey to the council. Sources tell us that Henry waited in the snow for three days before Gregory would see him. When they finally met, Henry submitted to Gregory agreed to allow Gregory to choose who could become bishop and in return received communion with the church once more.
Once he was back in the good graces of the Church Henry began to muster his forces to crush the rebellion while the coalition against him quickly crumbled due to infighting and a perceived betrayal by the pope as well the lack of will to fight the King now that he was in good standing with the church. In a few years Henry had thoroughly crushed the rebellion, and went back on his word and began investing bishops again. Once again, Gregory excommunicated him and once again, Henry proclaimed Gregory a false pope. However, this time there was no one in German to take up Gregory’s call to arms against Henry. With his position in Germany secured Henry gathered his army and marched across the Alps and laid siege to Rome with the intent of deposing Gregory. Gregory was saved by the timely intervention of the Normans in Sicily and Calabria, who drove off Henry’s army. Gregory spent the rest of his life an exile and died shortly thereafter.
In short, using the first part of the Investiture conflict as an example kings and nobles listened to the will of spiritual and religious figures when it was in their best interests to do so. Popes could use their spiritual authority to create a sort of justification or legitimacy for certain actions, and thereby influence powerful men to do or not do something based on the condemnation or blessing given to the action.
This is a very short overview of the conflict between Henry and Gregory. While the investiture conflict did not end here, I have also only begun to scratch the surface of relationships secular and spiritual rulers in the 11th century. It’s a fascinating subject and I highly encourage anyone to read more about it.
Sources: Blumenthal, Uta-Renate (1988). The Investiture Controversy: Church and Monarchy from the Ninth to the Twelfth Century. University of Pennsylvania Press. I. S. Robinson, Henry IV of Germany, 1056–1106 (Cambridge, 1999). • Emerton, Ephraim (1932). The correspondence of Pope Gregory VII: Selected letters from the Registrum. New York: Columbia University Press.