In 1984, Winston's transition from party rebel to reformed party member is effectuated in three stages. We learn this directly from O'Brien, in the opening lines of Part 3, Chapter 3:
"There are three stages in your reintegration," said O'Brien. "There is learning, there is understanding, and there is acceptance."
For Winston, the first stage represents a number of horrific beatings and general degradation of his character. He is accused of all manner of crimes, from sexual perversion to spying. The purpose of this is to "to humiliate him and destroy his power of arguing and reasoning," and it works: he admits to all of these crimes because he has been weakened to a point that he loses the power of reason and he is afraid of further violence.
Next, Winston must learn to understand Big Brother. Here, O'Brien confesses to Winston that he is the author of Goldstein's book and that rebellion against the party is simply not possible because the party exerts absolute power and influence over the people of Oceania:
"Power is in tearing human minds to pieces and putting them together again in new shapes of your own choosing."
Winston continues to protest but O'Brien shows him a powerful image. The image is his own battered and malnourished body. While he blames O'Brien for his state of health, O'Brien responds that it is Winston's doing:
"This is what you accepted when you set yourself up against the Party. It was all contained in that first act. Nothing has happened that you did not foresee."
But Winston is still not convinced and this brings about the third stage of his reformation: Room 101. What is interesting about this stage is that, so far, Winston has not betrayed Julia, no matter how the party treats or threatens him. This is Winston's last vestige of control and he does not give it up willingly. But, in Room 101, in Part 3, Chapter 5, Winston is confronted with his greatest fear, rats, and the betrayal of the women he loves quickly follows:
"Do it to Julia! Do it to Julia! Not me! Julia! I don't care what you do to her. Tear her face off, strip her to the bones. Not me! Julia! Not me!"
This completes the process of Winston's transformation. He has undergone these three stages and, piece by piece, he has been broken down and rebuilt, according to the party's norms and values. When he meets Julia again, he learns that she has also betrayed him and he learns an important lesson: that Big Brother can conquer all, even love.