One of the biggest means of unification for the ancient Greeks was the Persian Wars. From 490 - 480 BCE, the Persians made war on Greek city states. The entire war began because Athens supported the Ionian Greeks when they were rebelling in Anatolia against the Persians. This angered King Zurkzeez of the Persians so he led two major campaigns against the Athenians¹.
Athenians enlisted help of all of the Greek city states, who were still not really a unified civilization. Citizens considered themselves a citizen of their city, not of Greece. Two famous battles that took place during this time were the Battle of Marathon and the Battle of Thermopylae. Marathon was a plain 26.2 miles from Athens¹, hence the distance of today's marathons.
With that Greek victory, Greeks finally began seeing themselves as Greeks and Athens emerged as capital of the civilization.
A later, but equally important, war was the Peloponnesian war. This was a 30-year conflict between Athenians and Spartans. Spartans did not embrace democracy like the Athenians did. They instead had a kingship that functioned because of a huge class of mistreated slaves¹. Athens was by no means perfect either though.
At one point, Athenians sailed to island of Melos, a Spartan colony, and demanded they submit to Athenian rule. The island wanted to remain neutral but in response, the Athenians said to them “the strong do what they can and the weak suffer what they must.” This was one of the first explicit endorsements of realism in international relations¹. They then proceeded to kill all the Melean men and enslaved women and children.
The Spartans won the Peloponnesian war, contributing to the weakening of the Greek city states. This weakened Greece made it significantly easier for Alexander the Great to eventually conquer every single Greek city state. Greece would not see democracy again for another two millennia.