A phalanx formation is when a group of soldiers stand close together in a straight line, holding long spears and shields to protect each other like a big, strong wall. This way, they can work together to stay safe and help each other fight better against enemies.