The graphic below shows how the Roman commanders created a new model for infantry deployment.
Each legion was divided into three fighting types: Hastati, Principes, and Triarii. Hastati were closest to the enemy with Principes and Triarii behind them. The wealthier and most experienced soldiers were in the rear – the poorest and least experienced in the front. In front of the Hastati was a line of Velites; the weakest and most vulnerable unit of the army. They did not wear armor but carried wooden shields, javelins and short swords. Velites were not organized as units but were attached the other groups.
Maniples were a subdivision of the type of infantry. Hastati and Principes had twenty maniples of one hundred and twenty men. Triarii had twenty maniples of sixty men. The maniple was a very flexible because it was isolated from the other units, allowing more movement. Each maniple could adapt to the changing pressure of the enemy force and concentrate their own pressure where needed. This offered more flexibility than the Phalanx, which was a large unwieldy configuration.
In most battles the manipular formation proved superior to anything the enemy could deploy, and the Romans were typically able to destroy the enemy's center. Many times the Triarii were not even engaged. When the Romans ran into trouble it was usually due to an undersized or inexperienced cavalry. In the great battles against Hannibal, particularly Cannae, the Carthaginians were able to turn the wings of the Romans and attack the infantry from the sides. In their final battle against Hannibal at Zama, however, Scipio deployed strong cavalry to protect his wings and they were able to resist a flanking attack. The manipular formation also worked exceptionally well against elephants when the Romans created lanes for the elephants to run into so they could not trample the Roman lines.
The Romans used the Manipular Formation described here until 107 B.C. when Marius made changes to the formations. The number of maniples was decreased to ten and the number of men in a maniple was increased to one hundred sixty. Marius also made the army professional, inadvertently transferring the soldier's allegiance from the Senate to the commander and paving the way for the downfall of the Republic.