The prisoner from the next cell will give you some background on the situation. The annual prisoner race is about to begin. The winner is granted an audience in the warden's office, where the cell key is.
The race is very simple, just run straight ahead in the direction pointed by the guards. When you win and find yourself in the office, he'll start to read some poems of his to you. Turn Sneaking mode on and use the opportunity to sneak to the announcement board, read the code and head to the desk. Open one of the books. Whoops - that's not the right one. You've won yourself a year in the torture chamber.
One year later, another race is being held. Repeat the whole operation. This time you should get the right book and be able to open the cell when you are back in it. You can free the other prisoners or leave them, it doesn't really matter. When you leave the cell block, run to the east, to the barracks. You'll find you missing belongings in there. Go back to the torture chamber and free your mother using the lever again (I suppose you'll enjoy killing all the guards on your way). Run away the same way as before.
At the end of your way, in a big room with a water basin, a boss fight awaits you. This time it's a squid-like monster Kraken. First you'll have to take care of its tentacles. Wait for one of them to try to hit you, dodge, and then hit it. When you destroy all of them, the creature's head will come out of the water. Attack it as you will, trying to avoid the green laser beams (not very harmful, though). Once its health bar is half way through, the whole process will have to be repeated. When the monster drops dead, you'll be finally able to leave the darn place and be free again.