Unlike the naval warfare of other eras, boarding an enemy ship was not the primary offensive action of triremes. Triremes’ small size allowed for a limited number of marines to be carried aboard. During the 5th and 4th centuries, the trireme’s strength was in its maneuverability and speed, not its armor or boarding force. That said, fleets less confident in their ability to ram were prone to load more marines onto their ships.
On the deck of a typical trireme in the Peloponnesian War there were 4 or 5 archers and 10 or so marines. These few troops were peripherally effective in an offensive sense, but critical in providing defense for the oarsmen. Should the crew of another trireme board, the marines were all that stood between the enemy troops and the slaughter of the men below. It has also been recorded that if a battle were to take place in the calmer water of a harbor, oarsmen would join the offensive and throw stones (from a stockpile aboard) to aid the marines in harassing/attacking other ships.
Source: Wikipedia