In Ancient Greek warfare, what happened when two phalanxes met on the battlefield.

by Neato_Orpheus

I am having trouble imaging how the actual Martial combat of phalanx warfare happened when two opposing armies met.

If both sides had spears pointed in rows then did they just run into each other and hope that the other side chickened out?

I know it wasn't like 300 where people would break formation and have these badass one on ones cause the shield was too cumbersome to allow for it, plus it renders the whole point of a phalanx moot.

So what actually went down?

Dinocrocodile