The Pillory was a random event. Players could be sent to the pillory by a pillory guard. Prior to the 25 February 2009 update to Random Events, it was only available to members attempting to use the Thieving skill or by random (rarely). Since then, a player could receive this random event at any point.
The player needed to unlock the cage to escape, by clicking on the correct symbols.
It started out with three locks; if a player missed, it reset and an additional symbol was added up to a maximum of five symbols.
When the pillory random event was solved, a reward would be received. The only possible reward from this random is a Random event gift.
Before the 25 February 2009 update, some players would attempt to steal from stalls beyond their level. They wouldn't be able to steal, but were still able to get random events pertaining to stealing, one of them being the Pillory event.
Note that it was possible to teleport out of the pillory. Attempting to pickpocket the pillory guard will result in being caged, and you cannot teleport out. The player must apologize to the guard to leave.
Pillory Bug Edit
The pillory bug allowed a Member to get into the pillory in a Free-to-Play world. First, the player had go to a member's world and steal using the Thieving skill until they get the pillory random event. If the player was teleported to the Varrock pillory, the player could have then logged out and world switch to a Free-to-play world. It was impossible to get into the Varrock pillory any other way. Free players also could throw rotten tomatoes at the player in the pillory.
Solving the pillory lock while on a free world would teleport the player to Lumbridge without a reward.
- Pillory and Drill Demon are the only two random events introduced and removed on the same day of the year, making their existence in RuneScape exactly 7 years.