Legio (legionis)
At the dawn of roman history, the legion resembled the typical ancient phalanx, a square sturdy formation of heavily armored soldiers, who lined close to each other and wielded long pikes. This formation was too static, vulnerable when attacked from the sides or the rear, and the Romans learnt it the hard way against the Gauls, who used to fight in a loose formation.
After the Gauls pillaged Rome in 390 b.C., Furius Camillus changed the structure of the legion, to make it more maneuverable and agile. He created a model of perfect military organization, unsurpassed until modern times.
There were three ranks of soldiers, named hastati, principes and triarii, plus a number of velites, who didn't make properly a rank.
As an initial line-up, the velites, lightly armored and carrying javelins, slings and bows (rarely) formed a pre-rank in sparse formation. They made the first contact with the enemy, attempting to break its formation with missile weapons, or just made some skirmish with similar light infantry on the other side. Then they swarmed away and the first rank of legionaries came up. The hastati were called this way because they carried two hastae. Roman javelins were crafted so that their point would break or bend after piercing the enemy body or armor. So they became useless for the enemies, and could make the wound more serious, or get stuck in a shield and make it unusable. This particular throwing hasta (that just means 'pole') was called pilum. The two hastae each soldier had were not equal: one was more light, to be thrown at a bigger distance, the other was heavier, to inflict more damage at close range. Then the melee began.
Hastati and principes carried the same weapons (except the two pila). They wore chain mail, scale mail, or leather body armor, while commanders wore bronze plate armors covering the torso. They had helmets (cassis), leg armor going from the knee to ankle (ocrea), and a big shield (scutum). They fought with gladium, a short sword which was used to pierce instead of slashing, a more effective technique on a crowded battle field. The triarii had long hastae (not pila). The velites had no armor, except a small shield (clipeus) and possibly some leather cap.
The ranks were divided into ten manipuli, each made up of two centuriae. A manipulus of hastati had 120 men (plus 40 velites), the same for principes. while manipuli of triarii only had 60 men (plus 20 velites). They were the most expert veterans, brave but aged, who were left as a last resource. The Romans used to say 'res ad triarios rediit' (the thing has come to triarii) to mean that something was going to its extreme development.
Each manipulus was distanced from the next by a space wide as the manipulus itself, and the ranks were deploied with an offset that made them look like a checker. So enemies charging in the empty spaces were met by the second rank.
The legion was completed by 300 horsemen. They were light cavalrymen, with the main task of keeping the sides of the line and chasing off overridden enemies.
Further developments of the legion will include a size increase, up to 10.000 men.