Before the Marian Reform, the republic’s army was always organized in a particular order of battle; the main units in this order were the Hastati, Principes, and Triarii. The Hastati were young, inexperienced swordsmen who formed the front battle line, and were normally the first to engage the enemy after throwing their Pila.
If they were inable to break the enemy line or do very much damage, they retreated behind the Principes, who were similarly armed though with chain mail and higher quality equipment. The Principes were older and more experienced than the Hastati, and probably served as Hastati when they were younger. If the Principes also failed to break or damage the enemy lines, then the Triarii came in.
The Triarii were armed with spears instead of gladii, and were the most experienced, hardest trained of the three, and, as they were fairly “rare”, were only deployed at crucial points in the battle line, and to reinforce the other troops as they advanced. Cavalry were used to cover the flanks and the advance of the troops.
These three unit types all had the rectangular wooden shield with a centered iron boss that did not change very much over the course of Rome’s history. The Principes and the Hastati were armed with two pila, a heavy one and a light one, so as to be able to throw the lighter one a farther range, and do more damage with the heavier one at close range. These two were also equipped with a gladius, and the Triarii had spears. It is strange that they had such weapons, and were one of the only, if not the only, infantry that used spears, and not javelins or gladii.