Because of a large number of incorrectly interpreted depictions in film and television, the fighting methods shown for the Roman legion did not correspond to historical reality. The only film that at least attempted to portray the way the Roman legion operated was and remains “Spartacus”. The deployment is very realistic, but the subsequent battle scene has nothing to do with ancient tactics (more details can be found in the book).
Battle lines
Hastati = 1st line (front line)
Principes = 2nd line (middle line)
Triarii = 3rd line (rear line)
Note: The Velites (soldiers armed with light throwing spears) normally opened the fighting.