John Proctor has to decide whether to confess to witchcraft or refuse to confess and be hanged. He decides he would rather have his good name, and not lie, and is willing to be hanged.
Elizabeth tells John that the Deputy Governnor is hanging people accused of witchcraft that do not confess, and she says "the town’s gone wild, I think" (Act 2).
Reverand Hale pleads with him, telling him he can’t hang. Proctor “his eyes full of tears,” replies that he can.
I can. And there’s your first marvel, that I can.
You have made your magic now, for now I do think I see some shred of goodness in John Proctor. (Act 4, scene 4)
Proctor has always been against the witch trials. He confessed in order to please Elizabeth, or so he thought.
No more! I should have roared you down when first you told me your suspicion. But I wilted, and, like a Christian, I confessed. Confessed!
Proctor seems concerned with his soul, his name, and his goodness. He is interested in who he really is, and in making up for the sin of his affair. He wants to do better, even if all he can do is take his soul with him.
In the end, Proctor is happier to die with his name than to live a lie. Like the others who refused to confess, he is taking a stand. He refuses to succumb to the madness that overtook Salem.