In 1456, the Ottoman Empire had strong expansionist ambitions. As the state on the periphery of the Dar al-Islam, the Ottomans had not only a religious mandate to expand said dar but also got to keep a whole lot of the booty from those conquests. Those conquests certainly didn't hurt the sultan's treasury, and they provided an army for the state, too. The Ottomans had been expanding into eastern Europe for quite some time and as of the 1400's really only had two opponents there. One was an Albanian warlord named Skanderberg (a.k.a. Skanderbeg) and the other was the kingdom of Hungary.
Now, when I say the kingdom of Hungary, I might be somewhat overstating the case. In fact, no one other than the general Janos Hunyadi was able to successfully oppose the march of the Ottoman Empire. He had driven the Turks out of Serbia and had conducted raids into the Ottoman-held parts of the Balkans. These victories were major public relations coups in and for Christendom, and as a result of them Janos Hunyadi ended up controlling the majority of the southern Hungarian frontier and therefore being personally responsible for the integrity of the Hungarian kingdom against Ottoman aggression. He was also made voivode (governor) of the province of Transylvania, in which capacity he defeated Ottoman advances twice, again enhancing his fame.
Anyway, there had been a lull in the Ottoman advance for a while since sultan Murad II had been fighting a civil war in his Anatolian territory, but Mehmed II came to power in 1451. He quickly earned the appellation "the conqueror" after he victoriously concluded the long-standing siege of Constantinople in 1453, achieving what Muslims had sought to do since the days of the original conquests under Mohammed. The Hungarians got word of his intentions to conquer Hungary in 1454, starting with Belgrade. In those days, Belgrade was sometimes called Nandor-Fejervar, and it was one of the most important of the fortresses on the extensive fortress network of the south Hungarian frontier. It sat on the confluence of the Sava and Danube rivers, meaning that it formed an important first step toward controlling Hungary's major waterways. Hunyadi looked for help in the defense against the Ottomans from the rest of the lords of Hungary and even had Pope Callixtus III announce a crusade against the Ottomans in October of 1455.
Recieving little support from the Hungarian nobles, who were afraid of his rising power, Hunyadi had to send 4,000-5,000 of his own men under Mihaly Szilagyi to reinforce the fortress in the meantime. Of course, this was in the summer of 1456 after Mehmed's army had assembled at Edirne in the spring and begun its march northwards. The army was quite sizeable. At between 100,000 and 300,000 men, its pure numbers were more imposing than anything the European armies were able to put on the field, and the Hungarian king (also the infant ruler of Austria) Ladislas V fled Hungary on hearing the news. Mehmed's huge army marched north and laid siege to Belgrade.
Belgrade, as stated previously, sat on the edge of the confluence of the the Sava and the Danube rivers. The Sava comes from the southwest and the Danube comes from the east. The Sava takes a sharp northwestern bend just southwest of the city, forming a headland sticking out of the mainland to the northwest. The two rivers join together to the northwest of the headland, forming a large, vaguely triangular marshy area before the rivers drag themselves together and the Danube runs off to the northwest. At the bend of the Danube and the triangular marshy area sat the fortress of Zimony. The fortress of Belgrade sat on the headland I mentioned earlier, squished into the western edge of the thing by the city itself.
Mehmed set up his siege on the neck of the headland and started firing on the walls on June 29, 1456. He arrayed his men in three sections. The Rumelian (that is, European) corps had the majority of his 300 cannons, and his fleet of 200 or so river vessels had the rest. The Rumelians were arrayed on the right wing and the Anatolian corps was arrayed on the left. In the middle were the sultan's personal guards, the janissaries, and his command post. The Anatolian corps and the janissaries were both heavy infantry type troops. He posted his river vessels mainly to the northwest of the city to patrol the marshes and make sure that the fortress wasn't reinforced. They also kept an eye on the Sava to the southwest to avoid the infantry's being outflanked by Hunyadi's army. The Danube to the east was guarded by the spahi, the sultan's light cavalry corps, to avoid being outflanked on the right. These formidable forces were resisted by only about 7,000 men in the fortress, although the Serbian townsfolk helped resist Muslim attacks as well.
When word of this got to Hunyadi, he was in the south of Hungary recruiting additional light cavalry troops for the army with which he intended to lift the siege. Although relatively few of his fellow nobles had been willing to provide manpower, it just so happened that the peasants were more than willing to do so. Cardinal Giovanni Capistrano had been sent to Hungary by the Vatican both to preach against heretics like Greek Orthodox Christians and to preach the Crusade against the Ottomans. He managed to raise a large, poorly trained and equipped peasant army, with which he left for Belgrade. He and Hunyadi travelled together, but commanded seperately. Between the two of them, they had roughly 40,000 to 50,000 men.
Anyway, Mehmed heard about his approach and moved the vast majority of his river vessels up to Zimony to keep Hunyadi from crossing there and getting into his left flank. The smaller crusader force was able to get on Mehmed's left, between the Danube to the north and the Sava to the south, but they were too small and poorly equipped to do anything on their own. Hunyadi's soldiers camped almost due north of the city, arriving on July 9. In order to lift the siege, Hunyadi had two options. He could either send reinforcements in to help hold the fortress in hopes of outlasting Mehmed (difficult at best, given the marshy ground to the north of the city and Mehmed's total encirclement of same) or he could engage Mehmed's force in battle with his own in hopes of driving him off (probably impossible, given his force's qualitative and quantitative inferiority and the strong placement of the Ottomans). Hunyadi had between 20 and 40 fishing boats of various sizes. He took the smallish ones and loaded them down with rocks. Then he sent those downstream to damage and confuse the Turkish fleet. He loaded some fast craft with boarding parties to take over Turkish vessels. Those came in the second wave, and they were followed by the troop transports with which Hunyadi hoped to reinforce the garrison at the fortress.
Hunyadi started the battle for the river on the night of July 14, backed by artillery from the shore. The Turks made it difficult, but Hunyadi's forces succeeded in relieving the garrison. After repelling charges by the Turks for several days, Hunyadi's troops surprised the charging Turks by following them to their camp on July 22. They immediately began to destroy the Turkish artillery, after which they again took refuge behind the walls of Belgrade.
Seeing Hunyadi's success, the crusader force under Cardinal Capistrano began to cross the river to attack the confused Anatolian flank. Despite their crude equipment and lack of training, the crusaders inflicted some losses on the Ottomans, causing Mehmed to send his janissaries from the center to beat back the crusaders on the left. The janissaries were superior in almost every tactical way to the crusaders, being lifelong soldiers rather than raw peasant recruits, and the crusaders were not able to stand up to their attack. The janissaries hit them hard and pushed them back to the Sava river. Seeing this, Hunyadi gathered all of his cavalry inside Belgrade and attacked the right flank and rear of the janissary force, catching them unawares. Hunyadi routed the janissaries and the Ottomans retreated from Belgrade so fast that they left all of their cannon, ammunition, and supplies on the field. Hungary had successfully defeated a significantly larger force, thanks to the leadership of Janos Hunyadi.
Hunyadi, already fairly famous, grew to heroic stature almost immediately. Unfortunately for him, he died soon after repelling the Ottomans. The Turkish soldiers had brought some unnamed disease with them (not an uncommon occurence in premodern warfare), which had infected the city of Belgrade and Hunyadi himself when he had entered it to relieve it. He died on August 11, 1456. It's said that he was so highly regarded that when news of his death reached sultan Mehmed, the latter bowed his head for the better part of an hour in silence, despite having been cleverly beaten by him not a month before.
Sources: Bak, Janos M and Bela K. Kiraly, eds. From Hunyadi to Rakoczi War and Society in Late Medieval and Early Modern Hungary. New York: Brooklyn College Press, 1982.
David, Geza and Pal Fodor. Ottomans, Hungarians, and Habsburgs in Central Europe. Boston: Brill Publishers, 2000.
Komjathy, Anthony Tihamer. A Thousand Years of the Hungarian Art of War. Toronto: Rakoczi Foundation, 1982.
Hodgson, Marshall. The Venture of Islam, vol. 2. Chicago: University of Chicago Press, 1961.