My question is a little weird so I just put that simple title up, I'll try to explain more specifically below.
Obviously the goal in any fight is to break up or flank the other formation, but in the meantime the centers of the two armies are presumably fighting each other head on. Whenever shield walls are mentioned in the middle ages, it seems they fight each other with short weapons. Now as I understand it hoplites sometimes carried swords as well as spears, but if you were fighting with spears, it seems like the head on part of the fight would be comically ineffective. Poking at someone six to eight feet away with those massive shields just seems silly. I know VERY little about this, so maybe I'm just imagining it completely wrong. Anyway, just curious how it might have worked and how often they just switched to swords.
There's a decent description of that sort of thing here.
In ancient Greek armies it was common that after the initial connection the first few ranks would engage in short sword and shield combat, with the ranks behind providing support with spears.
Though in the Renaissance period the 'push of pike' was a standard engagement tactic. Now I can't go into great detail but it pretty much was each block of pikemen pushing as a unit trying to force their opposition back and attempting to create a weakness in the enemy line