They were defeated by a coalition of Greek city-states led by Sparta.
With their cavalry.
Plataea.
Battle of Plataea happened in -479.
The Persians fought against the citizens of Athens who were aided by those of Plataea.
The Persians were defeated and went home. However the war went on for another thirty years.
The invading Persians at the battles of Plataea and Mycale.
About 90,000 with 40,000 Greek allies on their side.
Battle of Salamis and later at the Battle of Plataea
They were defeated at three battles - sea battle of Salamis 480 BCE, land battle of Plataea and simultaneous sea-land battle of Mycale 479 BCE.
At the critical battles of Salamis, Plataea and Mycale the numbers engaged on both sides were about even.
Having lost the sea battle of Salamis, they then lost the land battle of Plataea, leaving them with no power.
The Greek won through superior sea (Salamis) and land (Plataea) tactics.