The pillory was a device used in punishment by public humiliation, and related to the lesser punishment called the stocks. Both were constructed of hinged wooden boards which articulated to form holes through which the head, or various limbs, could be inserted: once the boards were locked together the limbs could not be withdrawn. They were set up in marketplaces and crossroads: petty criminals would be imprisoned by them by having one or more limbs inserted through holes in the stocks, which were then closed and locked. Often a placard detailing the crime was placed nearby: these punishments lasted one or two hours.

Time in the pillory was more dangerous than in the stocks. The pillory used hinged boards, raised on a post, to clamp around the offender's neck and wrists, forcing the malfeasant to remain standing and exposed.

A criminal in the stocks would expect to be abused, but his life would not be at risk, but a prisoner in the pillory would be presumed to have committed a more serious crime and accordingly get a more angry crowd reaction. With hands trapped, he could not protect himself from heavy stones. Blinding and permanent maiming were not unusual consequences. The prisoner might also be subjected to further punishments while in the pillory, such as branding or having an ear cut off.

When Daniel Defoe was placed in the pillory at Charing Cross as a punishment for writing a satire, public sympathy won out over the desire of the government of the day to punish: the crowd threw flowers instead of the more usual vegetables, dead animals and stones.