John Waller was a highwayman. At the time highwaymen were a great menace to travellers on Britain's roads and penalties against them were very severe. He also gave false evidence against the innocent, causing them to be blamed for his own crimes, and was convicted of perjury.
Pillories were set up in public spaces, often accompanied by a placard detailing the prisoner's crime. A pillory was a wooden frame with holes into which a prisoner's head and hands were inserted and locked, exposing them to the scorn and violence of the crowd. The use of the pillory signalled that the prisoner had committed a serious crime, and would produce a suitably angry response from the crowd.