Your character in Outward can't die, instead you get stunned and moved to another location. After "death" you can find yourself in dungeons, where they will deprive you of all your equipment and health. You can also find a wanderer who will take you to his camp and heal your wounds.
If the bandits kill you, you can be imprisoned.
In order to get out of prison you have to pay the appropriate amount of cash.
For 30 silver a prison guard will let you free. You can take money out of your equipment, but if you don't have it with you, you have to work hard to earn it.
You can find a few pickaxes in prison. Use them to extract iron. One of the guards will pay you for the raw materials.
Take one pickax to another prisoner. He will take a tool from you in exchange for an egg. You will need it to make an omelet.
You will find the other ingredients (mushrooms and the second egg) by exploring the prison. Once you have the ingredients, go to the kitchen and make a dish.
The rest of the money can be gained by selling bandages or food to a woman.
If you give the prison guard the whole required sum of money, he will release you from prison and you will be able to enjoy your freedom.
The second way is to die multiple times in prison. There is a chance that the game will "show mercy" after some time and it may throw you to another location.