Triremes were ancient war galleys, originating with the Phoenicians and best known from the fleets of Ancient Greece. These were the dominant warship in the Mediterranean from around 700 to 300 BC. Naval combat at the time took place mainly by ramming enemy vessels, which would typically break apart from the force of the collision. In order for this to work well, the boats need to be both fast and maneuverable, which means they ought to have a large number of rowers but still remain as thin and short as possible. Earlier on longboats of increasing length were employed, culminating in the pentekonter, with 50 oarsmen, which was about the practical size limit for that design. However, the Phoenicians managed to construct larger galleys by having several layers of oarsmen stacked on top of one another, first two (the fairly uncommon bireme) and then three (the trireme itself).
Triremes did not sit especially low in the water, and so were fairly prone to tipping, especially in rough weather. They were equipped with sails, which were taken down before battles, but cramped conditions made them unsuited for long-distance travel, unless nearby friendly soil was present to camp upon each night. Usually they carried only a small force of ten or fewer soldiers to repel men who might attempt to board while the trireme was approaching its opponent. The two main ramming tactics were attempting to catch the enemy in the flank, and attempting to glide along side it with the oars pulled in, thereby snapping the other boat's oars and leaving demobilized. These required considerable skill to execute, and so rowers had to be specially trained. The Greeks usually recruited them from the poorer citizens who could not afford to serve in the army.
Triremes were expensive to build and maintain, which together with the need for specialized crew meant that only a very few of the powers at the time could afford large fleets. Most notable of these were the Phoenician cities, which provided a navy for Persia and her predecessors, and Athens. The engagement between the two at the Battle of Salamis, where the latter won thanks to superior positioning and maneuverability, is one of the most famous naval engagements of all time. Less famous but no less important was the Battle of Aegospotami, which sealed the defeat of the Athenian Empire by Sparta and her allies.
During the Hellenistic period, the trireme was largely though not completely supplanted by larger galleys, especially the quinquereme. The large of these on record was a "42-reme", so it is fairly clear that after some point the numbers stop referring to additional levels of rowers, and probably refer to the number of men per vertical cross section. This change was accompanied by increased reliance on tactics like boarding and using warships as platforms for artillery.