Punishments
You could be hanged for all sorts of crimes in the Middle Ages. But not all criminals were put to death. Many had to pay fines. A law passed by King Henry II in 1176 said that thieves had to have a hand and a foot cut off. Then they had to go into exile (leave England for ever). The king got all their money and goods.
Sheriffs' prisons were mainly for persons waiting to be tried. There were dungeons in lords' castles, of course. Powerful lords kept their enemies locked up for years. The stocks, pillory, and ducking-stool were for small-scale crime. Traders who cheated in the market would get a spell in the pillory. It taught them a lesson and warned other traders. And it was cheap entertainment for the public.
Men who had done wrong, but did not turn up in court, were condemned as outlaws. For the rest of their lives, they had no rights. It was not a crime to kill them, or steal from them. Many outlaws fled to the forests. These were partly wooded places where only the king could hunt. It was a crime for anyone else to kill deer there. Outlaws in the forests robbed travellers and killed the deer.
The most famous outlaws are Robin Hood and his 'merry men'. The story is a legend, but some things in it are true. There was a forest called Sherwood. There was a sheriff of Nottingham. In about 1230, in Yorkshire, there was even an outlaw called Robert Hood.
Walter Robson: Medieval Britain; Oxford University Press, 1991/2000, page 93 f.