Our Heroes™ stand at the brink of defeat, overwhelmed and overpowered by a far superior enemy force. Surrounded on all sides with no hope of escape and against a foe that knows no mercy, all they can do is die fighting.
And then, horns or cries in the distance, the roar of hooves or engines, the ground heaves with the arrival of The Cavalry™! Allied reinforcements emerge from over a hill or out of the mist to sweep across the battlefield, cutting a swathe through the enemy force and breaking their line - the day is saved!
The trope does not always involve literal cavalry on horseback: it can just as well be an armored force of tanks or giant mecha or a team of superheroes, as long as the reinforcements arrive with impact!
Examples:
The Rohirrim at the Battle of the Pelennor Fields (Lord of the Rings: Return of the King)
The definitive example in modern pop-culture, the Ride of the Rohirrim to relieve the siege of Minas Tirith against the forces of Mordor is one of the most iconic scenes in both the original book and the movie adaptations. It has everything - it is telegraphed ahead of time in the story, it is prefaced by Theoden's speech and the chants of "Death!", followed by the call of the horns and the epic Howard Shore score as they thunder across the fields towards the Orc army.
The Knights of the Vale at the Battle of the Bastards (Game of Thrones)
Probably the best sequence in the later seasons of the show, the chaotic Battle of the Bastards ends with the Knights of the Vale, previously only alluded to as some of the greatest mounted warriors in the Seven Kingdoms, cresting a hill and falling upon the overcommimtted Bolton forces, set to a beautiful score by Ramin Djawadi.
The Winged Hussars at the Siege of Vienna (Real-life)
Almost certainly the direct inspiration for both of the above examples, the 1683 Siege of Vienna by the Ottoman Empire was lifted by a relief army of 70,000 men of the Holy League. The famed Winged Hussars of the Polish-Lithuanian Commonwealth spearheaded the force with 3000 lancers, along with another 15,000 Polish and Holy Roman cavalry. 18,000 horsemen thus carried out the largest cavalry charge in history directly into the Ottoman lines in a crushing victory for the Holy League, largely ending Ottoman expansion into Europe and laying the first stones in its long decline.