A type of ship powered by a large group of oarsmen, in addition to, or in the place of, sails. The standard image is dirty rowers seated two-by-two down either side of a narrow aisle, like an even-more-sadistic school bus, overseers with whips, and a coxswain with a drum beating out a steady rhythm. Showing a character as a galley slave is a quick-and-easy way to depict their suffering, as it combines all the bad parts of being a sailor with all the bad parts of slavery - that is to say, all of it.
Real-life oar-powered ships were in use from the time of the Pharaohs up through the early steam era, in one form or another. The Viking longship and the ancient Greek Triremes are just the best-known examples. All these ship types assigned one rower to one oar, and the oarsmen were free
men that were either paid laborers, drafted recruits, or volunteers. Galleys that relied on multiple rowers per oar and were crewed by slaves did not show up until the Late Middle Ages. This rowing style is actually less efficient than each rower moving his own oar: Its only advantage is, in fact, that it allowed unskilled laborers (which is what slaves and convicts are) to be employed for rowing.
This trope was firmly established by Ben Hur
despite the movie being a good demonstration of why the ancient Greeks and Romans did not use slaves for galleys: Poorly treated slaves cannot row as fast as professionals, and the ship would be further slowed by the weight of all those chains and whip-wielding overseers. When a ship is in danger of being rammed, the worst thing to do is stop rowing and become a sitting duck, yet that is exactly what the panicky galley slaves do in Ben Hur
- Most depictions in media are direct references to Ben Hur; the title character spent a few years on a Roman slave galley.
- The Smokers from Waterworld showed off their cruelty by forcing their crew to move their flagship - a supertanker - by muscle power. This is spectacularly stupid since the supertanker weighs 30,000 tons even before loading any cargo, but Scifi Writers Have No Sense Of Scale.
- The undead crew of the Black Pearl in Pirates of the Caribbean used galley oars for a speed advantage. Since the crew were immortal zombies, they could conceivably push to flank speed for hours at a stretch, and still be ready to fight when they caught their prey.
- Uhtred, the lead character from Bernard Cornwell's The Saxon Stories, spent a year or so as a slave in the Dark Ages variant of a slave galley.
- Cazaril's backstory in Lois McMaster Bujold's The Curse of Chalion is revealed to contain two life-changing experiences/epiphanies during his 19 months as a rower on a Slave Galley (three if you cound the circumstances of him ending up on there to begin with).
- At least one Redwall book makes use of this.
- The galley was obsolete as a warship already in the end of 16th century, as sailing ships could carry far more cannons. The main reason why they were built after that date was purely penal: Their actual reason for existence was to be floating prisons and forced labour institutions.