Dante envisions Purgatory as a mountain. The seven levels of Purgatory in Dante's Divine Comedy are called terraces. At the top of the mountain is paradise. To get there, a person must be purified of sin by going through the seven terraces, which correspond to the seven deadly sins in Catholic theology. These seven terraces represent pride, envy, wrath, sloth, avarice, gluttony, and lust.
All of these sins are perversions of love. The punishment that corrects the sin and purifies the soul is related to the sin itself. The first three terraces—pride, envy, and wrath—deal with the perversions of love that actually harm others.
Pride has to be replaced by the virtue of humility. The sinners here are punished by being humbled or bowed down by carrying heavy rocks on their backs.
Since envy harms others by seeing, resenting, and trying to destroy what others have, the eyes of the envious are sewn shut with metal wires so they can't see while they learn envy's opposite, the virtue of generosity.
The wrathful must walk around in blinding, stinging smoke that represents how anger blinds people. The wrathful must learn gentleness (meekness).
The slothful are in a different category: they are deficient in love. Because they were lazy and uncaring in life, now they have to run around their terrace constantly to learn to be active.
The last three sins involve loving good things too much. The greedy have to lie on the ground reciting a psalm, the gluttonous have to go hungry while seeing fruit they can never reach, and the lustful sing a hymn while passing through a wall of flire.