In The Crucible, Mary Warren unwillingly comes to court, though she comes prepared to tell the truth--that she and the rest of the girls, led by Abigail, have been lying in court. She's unwilling because she's afraid of many things: Abigail, the court, undoubtedly her parents, punishment. She changes her mind, of course, once Abigail turns her own words literally against her and she realizes her immediate future is better with Abigail than with Proctor. She turns back on Proctor, claiming he was the devil and he was forcing her to make a false confession.
Proctor says that he is at the court to save his wife and then says he also wants to save his friends.
Mary Warren tells the court that her and the other girls only pretended to see spirits in the woods but ends up getting worried about what abigail will do to her, so she changes her mind again and says that Proctor threatened her life if she didnt tell the court she was pretending.
(hope this helps)