The pass at Thermopylae was a superb place to withstand an attack. Because it was so narrow, even with an army as large as the Persians had, only a small number could actually fight at any one time. This enables very few men to hold off enormous armies for long amounts of time.
The Greek army was about 10,000 strong and already in position when Xerxes and his army arrived. The Greek army was being led by the Spartan king Leonidas. The Persian Army attacked, but the Greeks held fast, and the Persian army suffered heavy losses. Time and time again the Persians attacked, but were turned away by the Greeks.
All seemed favorable for the Greeks, until a Greek traitor by the name of Ephialtes told Xerxes of an alternate route around the pass. This route, known to Leonidas, was only guarded by 1000 volunteering Phocaeans. The Greeks heard about the betrayal and about the Persian army that would soon surround them from the back.
They decided to retreat, but Leonidas would stay with 300 other Spartans to hold the pass long enough to make an organized retreat. The last battle at Thermopylae ended with every last Spartan fighting until they were killed. The distraction gave enough time for the rest of the Greek army to retreat into southern Greece. As a memorial to the 300 Spartans that stayed to fight, 3 inscriptions were set up. The first one, in honor of all, read:
Here did four thousand men from Pelops' land
Against three hundred myriads bravely stand.
Another was for the Spartans alone:
Go, stranger, and to Lacedaemon tell
That here, obeying her behests, we fell.
The third inscription was from a seer of Leonidas:
The great Megistias' tomb you here may view,
Whom slew the Medes,