It was fought by the southern Greek city-states to destroy the Persian fleet and so remove its threat to their cities. Destruction of the Persian fleet had two significant strategic results:
Firstly the Persians could no longer supply their army and navy from Asia Minor by sea as they could not protect the resupply convoys, so they had to send half their army home as they could not sustain it in the coming winter.
Secondly the Persian fleet could no longer threaten the Greek cities with amphibious assault, so the cities no longer needed to keep their armies at home protecting themselves. They were able to concentrate their armies at Plataia the following spring in 479 BCE and defeat the depleted Persian army and its Greek allies.
That ended the Persian invasion.