Stocks were a type of punishment in medieval times and continued to be used until the idea of public humiliation became abhorrent - Stocks have become a staple in fiction and are often employed by unjust rulers to torment their citizens (since it doesn't outright kill them it may be seen as an alternative to mass execution).
Stocks worked by strapping a victim's arms and neck between two planks of wood, often with an iron-lock - the victim would be left for a prolonged period of time like this and were often pelted with rotten fruit or worse by crowds.
In particularly brutal examples, victims would even be stoned (being hit with rocks) urinated on, spat on and punched - authorities did little to stop this as it was seen as part of the punishment.
Stocks were not designed to be fatal however and once the victim had been humiliated sufficiently they would be released - often exhausted and broken, this would lead to the practice being banned as an example of "cruel and unusual" punishment.
Usage in Present-Day
United States of America
American courts normally punish offenders by sentencing them to incarceration in jail or prison or to probation, which may include community service, although the stocks method was sometimes used in contemporary America.
In the 2004 case of United States v. Gementera, the defendant was convicted of mail theft and sentenced, among other measures, to stand in front of a post office for eight hours wearing a sandwich board that read: "I stole mail. This is my punishment." The U.S. Court of Appeals for the Ninth Circuit upheld this sentence, finding that the district court did not impose it solely for the purpose of humiliation, but also to serve the criminal-justice goals of deterrence and rehabilitation. The Ninth Circuit further found that the alternative sentence did not violate the Eighth Amendment's ban on cruel and unusual punishment because it was "within the limits of civilized standards" and was not coupled with a lengthy prison sentence.
In the year 1989, the Arkansas town of Dermott in Arkansas passed a curfew law punishable by up to 30 days in jail for the offender and up to 2 days in the stocks for the offender's parents. The city almost immediately removed the stockade punishment because, among other things, the city did not have a stockade and had allocated no funds to build one.
The British town of Thame made international headlines in 2016 when it took up a proposal to build stocks in the town. Introduced by Councillor David Bretherton, the stocks would be used for hire and for charitable events. As noted by Bretherton, "Perhaps for charity we could do something like that, get people in the stocks and have others donate money for the time they last while having their feet tickled.” Bretherton noted that the stocks were still legal in England. It is not believed that the stocks would be used for actual punishment purposes. Currently, further study of the topic is ongoing.
Withinn the South American country of Colombia (also known officially as the "Republic of Colombia") in 2012, married 34-year-old Alfreda Blanco Basilio and her 18-year-old lover Luis Martinez were placed in stocks by the Sampues tribe due to Basilio's adultery. Basilio spent 72 hours barefoot in the stocks for her crime.