The city-states of southern and central mainland Greece held a conference and resolved to oppose th Persian demands for submission. They also sent envoys to the western Greek cities in Sicily and the islands soliciting support. They elected Sparta to command on land and sea, and patched over standing disputes between the cities, at least for the time being.
The Spartans and Athenians sent a force of 100 ships and 10,000 warriors to the pass at Delphi to try to head off a Persian advance, but finding that thee pass could be easily outflanked by an inland route, soon abandoned it.
It was obvious that the key factor was the dominant Persian fleet, which could threaten all of the southern city-states one by one, which as a consequence kept their armies at home defending their cities, and these cities could be defeated one by one. So in order to be able to concentrate their land forces against the Persian army they had to get rid of the threat of the Persian fleet.
They resolved to block the Persian army at the pass of Thermopylai and so force the Persians into a sea battle to turn the position, and the sea battle would be in a narrow passage at Artemesion wher the larger and more numerous Persian ships could be matched.
The sea battle faied and the blocking force was withdrawn from the pass, so they made a second attempt in the similarly narrow waters at Salamis, which suceeded. The depleted Persian fleet was withdrawn to Asia and half the Persian army was sent home as there was not enough food in Greece to support it during the winter now that the Persian fleet could no lomger protect the resupply ships from Asia.
This evened things up. With the threat to their cities gone, the Greek cities sent their armies to join up in the spring and defeat the remaining Persian force and its Greek allies at Plataia.
Of course, after they had defeated the Persians who went home, the cities went back to fighting each other.
There were alliances between them, which shifted according to circumstances. As the Persian threat emerged, they took sides, some with Persia, a couple of dozen led by Sparta, against Persia.
For fifty years the Greek city-states reduced their usual fighting amonst themselves to face the Persian threat. When peace was arranged with Persia, they then went back to serious fighting amongst themselves.
They first defeated the Persian fleet at Salamis which removed the Persian amphibious threat to their cities and allowed them to send out the armies being held at home to defend them. It also meant that Persia could not feed its army without protection of its supply fleet, and it had to send half it's army home. The combined armies then defeated the army of Persia and it's Greek allies at Plataia, and simultaneously defeated the rump of the Persian fleet at Mycale.
After the Persian threat subsided, he converted the Delian League, which was formed to oppose Persia, into an empire of Athens, giving Athens the resources of over 189 city-states.
It foussed Greek attention on Persia as both a threat and an opportunity. This was taken up by Macedonia which conquered the Persian Empire and expanded Greek influence through the Middle East and Egypt.
It helped end the Persian invasion, together with Salamis and Mycale. However the Persian War went on for another 30 years. And the Persians regained the territory it lost later as the Greeks paralysed themselves fighting each other, Persia took back control of its territories in Asia Minor.
Some cities submitted to Persian rule, others were compelled to, and others were allied to Persia. Some resisted and allied themselves temporarily to resist the threat. At the end of the Persian threat, they went back to their usual occupation of opposing each other, individually and/or as part of leagues. The outcome was the destructive Peloponnesian War wher Sparta and its allied fought and defeated Athens and its allies/empire.
The Battle of Salamis was brought on by the Greeks in order to end the Persian amphibious threat to the Greek city-states. This threat made the cities keep their armies at home in self defence. The defeat of the Persian navy at Salamis ended that threat, and the cities were then able to send out their armies to unite and defeat the Persian army at Plataea, ending the Persian invasion.
Persia had already absorbed the Greek city-states in Asia Minor. These states were restless and encouraged revolts against Persia. Persia sent an expedition to bring the main troublemakers, Eretria and Athens under control, but it was defeated at Marathon. Persia then tried to bring all the Greeks under its control to prevent their constant wars, but failed and eventually left them alone to go back to fighting each other.
Threat of annihilation by the Persian invasion
He captured the eastern Mediterranean ports to eliminate the Persian navy threat and then defeated the Persian armies.
He captured the eastern Mediterranean ports to eliminate the Persian navy threat and then defeated the Persian armies.