When you get arrested by a guard he will take you to jail and you can choose to serve your time by resting in the bedroll or try to escape.
Use this if you aren't using the expansions. Otherwise, you want Morrowind Go To Jail Mournhold and Solstheim.
Go To Jail.esp
All original content on this site is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.