Mary Warren went to the courts in act three determined to confess that she and the girls were merely pretending. John Proctor helped to convince her to do this, because he is desperate to get his wife, Elizabeth, freed. Mary knows that it is all a fraud, but thus far...
Mary Warren went to the courts in act three determined to confess that she and the girls were merely pretending. John Proctor helped to convince her to do this, because he is desperate to get his wife, Elizabeth, freed. Mary knows that it is all a fraud, but thus far has been too chicken to come forward and state it. She is worried that if she does, "they'll turn on me," as she says in act two, meaning, Abby and the other girls will accuse HER of being a witch. Mary is terrified of this accusation; she knows what power Abby has over the courts, and that if she crosses Abby, Abby will take revenge on her. Mary doesn't want to be accused of being a witch; she fears it and avoids it at all costs.
However, after Elizabeth Proctor is arrested on the ridiculous claim that she stabbed Abby in the belly with a needle, John convinces Mary to be brave and tell the courts that she and the other girls are all pretending. And, she tries to do this, she really does. She gets up there, tells the judges that "it were all pretense" and tries to explain how that could be. After the judges turn on her and command her to faint, she says that she can't, that she's all alone, and when she fainted in the courtroom all of the other girls were screaming and fainting "and you seemed to believe them," and so she got caught up in the mass hysteria of it all. However, as soon as the judges start listening to Mary, Abby turns on her. Abby starts pretending to be super scared, and to see a "yellow bird" that is supposedly Mary's spirit, that wants to come down and pluck her eyes out. All of the other girls follow suit, and pretty soon Abby has the judges believing that Mary is sending her spirit out to attack her. Mary sees how Abby has turned the judges against her, and because she fears being accused of being a witch, she denounces her previous claims of having pretended, and accuses John of influencing her.
So, instead of sticking to her guns and being brave, Mary, in order to get out of being accused of being a witch, turns on John and calls him a "devil's man" who came to her and forced her to sign his "black book" and told her that she must come to the courts to overthrow them. As soon as she does this, Abby stops with the ridiculous (and fake) bird act, and accepts Mary back into her good favors. John ends up being accused of witchcraft, and Mary saves her own neck.
I hope that clears things up for you a bit; it's a confusing scene with lots going on in it, so I hope that helps. Good luck.