
The
'Thieves Cat,' used to inflict punishment for theft, which was
considered a particularly offensive crime on board ship, had each of
its thongs knotted three times to cause additional pain.
All formal punishments — ordered by captain or court
martial —
were given ceremoniously on deck, the crew being summoned to ‘witness
punishment’ and drama enhanced by drum roll and a whole routine,
including pauses, untangling of the tails, a drink of water and so on
which is believed were more intended for the observing crew than for
the actual participants. Informal 'daily' punishments, usually
without assembly, were often left unrecorded.
Keel Hauling
Keelhauling (from Dutch kielhalen; "to drag along the keel") was a severe form of corporal punishment meted out to sailors at sea.
The sailor was tied to a rope that looped beneath the vessel, thrown overboard on one side of the ship, and dragged under the ship's keel to the other side. As the hull was often covered in barnacles and other marine growth, this could result in lacerations and other injuries. This generally happened if the offender was pulled quickly. If pulled slowly, his weight might lower him sufficiently to miss the barnacles but might result in his drowning. If the rope snapped, the Captain could conclude that the punishment was not done properly and order it carried out again.
Keelhauling was legally permitted as a punishment in the Dutch Navy. The earliest official mention of keelhauling is a Dutch ordinance of 1560: the practice was not formally abolished until 1853. While not an official punishment, it was reportedly used by some British Royal Navy and merchant marine captains, and has become strongly associated with pirate lore.

A woodcut showing keelhauling
Hanging
In the 18th century judicial hanging was typically one of two
types. The Short Drop or Suspension hanging.
Short drop
The short drop is done by placing the condemned prisoner on the back of a cart, horse, or other vehicle, with the noose around the neck. The vehicle is then moved away leaving the person dangling from the rope. Death is slow and painful. The condemned prisoner dies of strangulation. (Prior to 1850, it was the main method used.) A ladder was also commonly used with the condemned being forced to ascend, after which the noose was tied and the ladder pulled away or turned, leaving the condemned hanging.
Suspension hanging
Suspension
hanging is similar, except the gallows themselves are
movable, so that the noose can be raised once the condemned is in
place. Similar methods involve running the rope through a pulley to
allow raising of the person. This is the method of hanging used
onboard ship.
A sailor could only be hanged for mutiny, treason
or desertion. Hangings, possibly due to the shortage of men, were rare
events. Pirates were not so lucky. A mutineer (or pirate) would
be hanged from the Yard arm of the ship. If he
was well liked his crew mates might be able to haul him up fast enough
to break his neck. Occasionally a man would jump overboard to avoid the
slow strangulation
of the noose.
Pirates were sometimes executed by hanging on a gibbet erected
close to the low-water mark by the sea or a tidal section of a river.
Their bodies would be left dangling until they had been submerged by
the tide three times. In London, 'Execution Dock' is located on the
north bank of the River Thames in Wapping; after tidal immersion,
particularly notorious criminals' bodies could be hung in cages a
little further downstream at either Cuckold's Point or Blackwall
Point, as a warning to other waterborne criminals of the possible
consequences of their actions (such a fate befell Captain William
Kidd in May 1701).
In some cases, the bodies would be left until their clothes rotted or even until the bodies were almost completely decomposed, after which the bones would be scattered.
In cases of drawing and quartering, the body of the criminal was cut into five portions, each of which was often gibbeted in different places.
So that the public display might be prolonged, bodies were sometimes coated in tar and/or bound in chains. Sometimes, body-shaped iron cages were used to contain the decomposing corpses.

Gibbet
Cage