Other forms: pilloried; pillories; pillorying
A pillory is a wooden frame with cutouts for someone's head and hands. Long ago, people found guilty of a crime could be sentenced to be locked in a pillory for a certain amount of time for punishment but also for public humiliation.
The verb pillory means to be punished by being locked in a pillory, but references to this form of punishment are historic and it is no longer used — you might see references today to someone in a pillory in a cartoon. As a modern verb, pillory means both to criticize harshly and to expose to public ridicule. Someone who is caught doing something immoral may be pilloried and people who believe they have been unfairly criticized say they have been pilloried, but often only after they've been exposed!