Both.
Prison should serve as a punishment so it is a deterrent to other people who might be considering committing crimes. It should not be a nice place to be and should in fact be considered very much the last place you would ever want to go.
However, if you are going to release people out of prison and back into the real world it also needs to be not only a place of rehabilitation but should also keep people with long sentences up to date with the world as much as possible. Imagine someone who went into prison in the 1980s being released now, so much has changed they wouldn't know how to react if they had been kept entirely isolated from outside changes.
The problem is balancing these two out, because often rehabilitation means showing people that there are other ways of resolving conflicts besides violence, stealing and murder, but to someone who only understands violence at first violence will have to be used until they can be broken out of that cycle.
It's probably almost impossible, but I do think prisons can be both rehabilitative and punitive. Or at least fall somewhere between the two.
RamirezDoEverything said:
A punishment, rehabilitation will do nothing, if someone is a natural born killer/thief, they will continue to do it, you can't change personalities and belief.
I personally support torture for criminals.
what
First off, torture against anyone is inhumane and a sign of cruelty or at least lack of empathy with other humans. If your response to that would be to say that you don't think criminals are other humans then you have severe problems you probably need to get help for.
Also, do you honestly believe there is any such thing as a 'natural born killer/thief'? Science can't even prove if people will naturally be jerks, nice guys or average joes and you're positing that there exists such a thing as a natural killer unchangeable in the entirety, and that that person is thus worthy of death and torture?
Even if you were to take the most common types of personality disorder which lead to people killing, sociopathy, psychopathy, paranoid schizophrenia and a whole host of others, and then prove that these mental imbalances were irrefutably naturally occuring, nothing we could do about them, then still the amount of people with the conditions who don't commit murder would far outweigh the amount of people who do.
And what about people who steal out of desperation because they don't have any money? Are they worthy of torture too? What about people who commit piracy, which is a crime, should they all be tortured? Are they natural born thieves who would go on stealing regardless of if you tried to talk them out of it, or spent any time finding out why they had problems?
Your post borders on ignorance of human psychology, humanity to your fellow man, and common sense.