During the era in history when Ancient Greece was at the height of power, great armies came in many cultures but one dominant formation: the phalanx.
Available under the wikipedia Greek Phalanx article.
The word phalanx comes from the ancient Greek word for ‘finger.’ And in Greece, the fighters in a phalanx were hoplites. These warriors were the citizens of the city. They provided their own weapons and armor and came together for the defense of the city state. They were armed with spears, short swords, bronze body armor, a helmet and greaves as well as a round ‘hoplon’ (shield) which gave them their name.
This is a formation in which men march in close quarters. They leave no gaps between rows, and the front ranks hold spears pointed at the enemy. Because of the way that a phalanx works, the initial arrangement of the formation decided the direction (and sometimes the outcome of the battle) of the phalanx. They were not very maneuverable and had little way of being directed to move any way but forward.
The strength of a phalanx depended on the discipline, strength, and endurance of the men of which it was composed. The purpose was a contest of these things as two phalanxes would close together in a kind of brutal pushing war.
During the rise of the Macedonian Empire, Philip II and Alexander the Great modified the phalanx by employing an army of professional soldiers and equipping them with more standardized weapons and armor and significantly longer spears. These men were much better trained, and their phalanxes were capable of more complex maneuvers.