The army of Ancient Rome (mostly the Republic then the Empire, not much has survived to tell about the Kingdom outside of legendary conflicts) was the Mother of All Badass Armies. Quite literally, in fact. The classic modern organization with hierarchies of standardized units and subunits was based on organization structures developed by Italophile 16th- and 17th-century commanders who were consciously attempting to make a copycat. Thus, in fact, the curious sense of recognition a modern person might get on contemplating the Roman army is by no means accidental.
The Roman army was originally a city-state army roughly on the model of those of Ancient Greece. However different circumstances of Italy, including hilly terrain, caused Rome to develop what is called the Manipular Legion. The legion (originally meaning simply muster) was the basic building block of the Roman army. It was roughly the same as what might be called a reinforced brigade now. It had about four to six thousand soldiers who were citizens and roughly equal number of allied or mercenary troops organized into alae, or wings, some of whom provided specialty skills such as archery and cavalry. The foundation of the army was Rome's citizen soldiers; they wielded the pilum (a short javelin of Etruscan origin with a heavy iron head designed to punch through an enemy's armor and/or embed itself in his shield and weigh it down) and a shortsword similar to that used by the Greeks (the famous gladius wasn't adopted until the Punic Wars, when it was copied from Spanish warriors). The Manipular Legion was divided into a number of centuries (commanded by a centurion, naturally). Two centuries made a maniple. The maniples were traditionally arrayed in a checkerboard formation of three lines, with the youngest and most unexperienced soldiers (Hastati, presumably for being originally armed with the hasta pike) in the first line, the more experienced Principes in the second line, and the pike-armed veteran Triarii in the third. This by the way led to a slang term. When a Roman said "It has come down to the Triarii" he meant "things are tough," because of course the Triarii wouldn't join unless their experience was really needed. In a sense, it both meant that things were dire, but also that it was now the real adults' turn to try and fix things.
After the Punic Wars and the conquest of much of the Mediterranean, the Romans found themselves underprepared to handle the Gallic tribes to the north, who were starting to raid their cities. It was once though that a man named Gaius Marius then implemented a solution, now known today as the Marian Reforms, though scholarship over the last four decades have thrown serious doubt on whether the Marian Reforms were actually a singular set of reforms by a single individual rather than a gradual shift stretching all the way to the early Empire. The Manipular structure of the military was replaced by the Cohort structure. A typical Cohort was six centuries of soldiers, for a total of about 480 soldiers strong (with an additional 120 non-combatants who served as support staff), and was about the same size as a battalion. The exception was the First Cohort in an army, which always had roughly 800 total soldiers and 200 support staff, due to being the most senior Cohort and having specialized soldiers in its ranks. These Cohorts were much more tightly-packed than earlier Maniples were, which prevented them from being overwhelmed by their more tribal opponents.
The Marian Reforms also changed the army from a citizen levy to a professional force, by virtue of a 16-year service pledge; being a soldier would be a full-time occupation for much of an adult's life. The property requirements for joining the army were dropped; soldiers would be paid and provisioned by their commander, or later, the state. The equipment was standardized, with all legionaries issued the gladius sword, a large shield (scutum), body armor made of chainmail, scales, or (later) segmented plate, a helmet, and javelins. Non-citizens were recruited into the army as auxiliaries, being rewarded with Roman citizenship upon discharge. Auxiliaries served as archers, cavalrymen, skirmishers, and light infantry, allowing citizens to specialize as heavy infantry. A full Legion saw ten Cohorts, always including the First Cohort with its larger manpower, paired with auxiliaries and cavalry for a total of around 5,400 total soldiers.
The expression goes "all roads lead to Rome"; in fact, the opposite is true. All roads lead FROM Rome and some people happen to walk on them the wrong way. The roads were built by the army on their way to conquest. Further, their every stop for the night was accompanied by building a fortified camp. In the morning, it was dismantled so that enemies couldn't use it. They had no fear of using earthworks and engineering in combat, and on at least one occasion they literally altered the face of the Earth.
Alexander the Great is known to have turned an island into a peninsula because the inhabitants made him angry. Not be topped by some pansy Macedonian, the Legion built a mountain. Why? Because on another mountain there were some rebellious Israelites, and Rome doesn't like rebels. More accurately, the rebels hid in the famous Masada, put on the top of a mountain and impossible to take by force due the only way of approach was a very narrow path. In order to root them out, the Legion built a ramp from ground level all the way to the top of the mountain, so they would be able to approach in proper formation and their siege engines. Then they killed the rebels (or would have, if they didn't all commit suicide). If the mountain came to Mohammed, it may be because Rome brought it to him.
In terms of arms and armament, each legionary carried a gladius and two pila. The gladius was the Roman short sword, intended more for thrusting than for slashing (though its broad blade was plenty capable of slashing when the opportunity arose). The pilum was a javelin with a wooden haft, a short iron point and long iron neck. The pilum's compact point and thin neck allowed it to punch through shields, either wounding/killing the person behind the shield or at least becoming lodged and burdening the shield with an extra ten pounds of off-balance wood and iron. There is a debate about whether the neck, being made of unhardened iron, was designed to bend on impact; Caesar mentions bent pila stuck in shields in Commentaries on the Gallic War, and modern replicas are known to do so sometimes. When this happened, it would prevent the enemy soldier from just picking up the pilum and throwing it back at the legionary. For last-ditch defense, soldiers also carried a dagger called a pugio with a broad leaf-shaped blade and a distinctive iron-covered hilt, copied from Iberian weapons.
In terms of armor, the movies sometimes get this right; they wore a distinct type of cuirass, now termed lorica segmentata (the historical name may have been lorica laminata), which was made up of many metal strips fastened by leather straps over wool padding (...for at least over a hundred years. Otherwise, they used mail and scale armor, which they named lorica hamata and lorica squamata respectively, and which certainly preceded lorica segmentata by centuries, were used alongside it, and later supplanted it again for unclear reasons. We'd forgive you if you never saw mail armor on Roman soldiers before anyway), aprons made of hardened leather strips, and heavy boot-sandals called caligae. The design of the helmet reflected their focus on slashing swordplay, as it protected the top and side of the heads, but not the face. Contrast this with the design of Greek helmets which protected the face from the thrusts of 15-foot long spears (and, later, 18-foot pikes under Philip and Alexander of Macedon). The plumes and such that you see on TV (and at casinos) were actually reserved for officers as an identifier of rank.
The term "legion" was somewhat similar to the modern term "regiment" or "battalion", denoting a portion of the army of a particular size. During the height of the direct (as opposed to hegemonic) empire, the legions spent their time at the outskirts of the empire maintaining control. The more troublesome a region, the more legions it received. Thus Hispania (modern Spain) only needed one legion, possibly a testament to how thorough its previous pacification had to be, but Judea (modern Israel, Jordan, and surrounding countries) had three, caused by constant Jewish revolts. Britain was troublesome enough to warrant four, and these legions would frequently be used by usurpers.
The command structure of a legion during the early Imperial era looked something like this:
- Legatus legionis ("legate of the legion") commanded the whole legion on behalf of the Emperor (or a Consul in the Republican times) and usually came from the Senatorial class.
- Tribunus laticlavius ("broad-striped tribune") was the Legate's Number Two, typically under 25 and also from a Senator family. This office was created by the Marian reforms and seen as the first step on the cursus honorum.
- Praefectus castrorum ("camp prefect") was responsible for training, equipment, and camp construction. He was typically promoted from a primus pilus (see below) and thus could rise from any of the lower classes.
- Tribuni angusticlavii ("narrow-striped tribunes") were five military tribunes serving as senior staff officers. Unlike the tribunus laticlavius, they typically came from the Equisterian order.
- Primus pilus ("first spear") was the most senior centurion of the legion, who commanded the first century of the prestigious, double-sized first cohort and was the only centurion allowed to attend the Legate's war councils.
- Centuriones ("centurions") led a century each and were elected, appointed, or promoted to the position for a variety of reasons. All centurions were theoretically equal in rank (except for primus pilus), but in practice, the commander of the second century of the first cohort held more authority than he of the tenth cohort's sixth century. The cohorts themselves did not have a permanent commander, with the most senior available centurion typically taking charge.
- Optio centuriae ("century's chosen") was hand-picked by each centurion from among his men to serve as his Number Two. He received double pay and would usually take over if his centurion couldn't perform his duties.
Each legion was divided into ten cohorts named "first cohort", "second cohort" and so on. The first cohort was the most prestigious, the tenth the least. Each cohort was divided into six centuries containing ~80 (not one hundred) men, led by a centurion. In terms of seniority, the centurion of the first century of the first cohort was the most senior officer and that of the sixth century of the tenth cohort the most junior. All told, the legion had a strength of approximately 5,400 men, once officers, engineers, and auxiliary cavalry were accounted for.
Speaking of auxiliary, the legion was beloved by Rome and it was truly a fearsome heavy infantry and the backbone of the Roman army. That said, the Romans weren't stupid and knew that victory relies on the ability of the army to meet the enemy regardless, and auxiliary forces were used to supplement the legion. The auxiliary units comprised light and heavy cavalry, archers, and sling-men. They were made up not of Roman citizens, but of citizens of captured, absorbed, or client states. Only Roman citizens could become legionaries. However, serving in the auxiliary was a path to citizenship, so the children of auxiliaries could become legionaries. Over time, this led to difficulty as it meant that there were fewer people available for the auxiliaries, which, despite the fame and esteem of the legions, truly were necessary for a balanced and viable fighting force.
One last note: the term decimation is Latin and literally means "destruction of one in ten". Any demonstration of cowardice or mutiny was punished by decimation. The unit was divided into groups of ten and the men drew lots. Whoever got the short straw was beaten to death by the other nine. Officers tended to be executed separately from the rank and file. Such an extreme measure was only used a handful of times in Rome's history.
The Roman army continued to evolve for a long time. Toward the later days it was almost indistinguishable from a feudal army. The Roman forces in the Eastern Empire, however were able to maintain a shadow of the old-school professionalism for a long time, having survived the destruction of the Western Empire by nearly 1,000 years.