A bilge pump you mean? They were hand-powered. I've seen both lever-action and crank-wheel type arrangements on old sailing vessels.
This page has some photos of pumps on HMS Victory.
Pumping was an unpleasant and arduous manual task and, if possible, not a job for prime seamen. On Royal Navy ships marines were often made to man the pumps, and amongst pirates it was not uncommon for slaves or forced men to be given the job. A good tight bilge pump smelled, and conventional thinking was that the stronger the smell the better the state of the hull.