Lockups like the one at Wheatley were used for incarcerating petty criminals for short periods. Drunks would often be locked inside until they sobered up. In fact, some lockups were actually attached to pubs, with the landlord having the key.
Lockups were part of a justice system that operated on a very local level. They were often an element of a complex that included stocks, pillory and village pound, the last having been in existence since the 1560s. Lockups belonged to the parish and were provided by the vestry or corporation of a town. They were not jails but places where someone who had not been brought to trial could be held securely.
Generally the lockup was used by the parish constable who had the (unpaid) job of keeping law and order in his own parish. He could also lock up more serious criminals before they were sent to a larger jail or before they had their case heard by a magistrate or judge.
Lockups generally went out of use in the mid-1800s, when a nation-wide organised police force developed and police stations with cells inside were built.