The Triarii were spearmen in the armies of the early Roman Republic. They were the oldest and among the wealthiest men in the army, and could afford good quality equipment.
In most battles triarii were not used because the lighter troops usually defeated the enemy before the triarii were committed to the battle. This is because the triarii stood at the last line after the principes and the hastati, thus they only had to fight whenever the first two lines have to retreat to regroup or have been defeated. They were eventually phased out after the Marian reforms of 107 BC.
In the Rome - Total War setting, Triarii is best used to counter cavalry units and to defend areas such as bridges or gateways. They use spears which are very useful against cavalry.