How prison time is a corrective measure or punishment

Explain to what extent how prison time is a corrective measure or punishment? What do you support and why?