The stocks were a mild medieval restraining device for minor offenders

Details :-

They usually consist of two pieces of wood or iron, hinged at one corner
with a lock at the other. The two planks have holes cut so that an
offenders ankles were locked in place when the stocks are closed.

Use :-

stocks have been used from Anglo-Saxon times until 1837 as a means of
punishing minor offences such as drunkenness, resisting a constable or
drinking alcohol during church services. The offender was forced to sit
with his ankles imprisoned for a specified number of hours as decreed by
the magistrate. Unlike the pillory, his hands were free to defend himself
from the crowd. In 1405 a law was passed that required every town and
village to have a set of stocks, usually placed by the side of a public
highway or village green, some examples still exist in the area but are
unused.