Elizabeth goes to court because she is accused of witchcraft by Abigail, her former servant girl. Abigail had an affair with Elizabeth's husband, John Proctor, so that Elizabeth dismissed her. When Proctor breaks off their affair, re-affirming his loyalty to Elizabeth, Abigail is devastated. She blames Elizabeth in the first instance for turning Proctor against her.
It’s she put me out, you cannot pretend it were you. I saw your face when she put me out, and you
loved me then and you do now! (Act I)
This quote is from the only scene in which Proctor and Abigail appear alone together, early on in the play. Abigail here is trying desperately to hold on to Proctor's love. At this stage, she does not want to blame Proctor at all. She recognises, too, that Proctor still has feelings for her, even although he feels compelled in the interests of morality, and his own gnawing sense of guilt, to break off the affair. It is after this that Abigail, rebuffed, vows revenge.
The whole witchcraft hysteria is created by people like Abigail, who take the opportunity to get rid of people they harbour a grudge against. Indeed she is presented in this play as being the prime instigator of the whole affair. At first Elizabeth's name is only 'somewhat mentioned' in the court (Act II), as even Abigail doesn't dare accuse Elizabeth outright to begin with, as Elizabeth is generally regarded as a respectable, upstanding member of the community.
However, Abigail then goes to great lengths to ensure that Elizabeth is brought to court on the charge of witchcraft. It seems she tricks Mary Warren, the Proctors' new servant, into making and taking home a little doll, or 'poppet'. Mary sticks her needle into this poppet for 'safe-keeping' (Act II). Meanwhile, while sitting at dinner in the Reverend Parris's house, Abigail is found with a needle sticking in her belly and accuses Elizabeth of doing it to her through witchcraft. The sceptical Proctor points out that Abigail no doubt stabbed herself. However, in the eyes of the court, the fact that a doll was found in Elizabeth's house with a needle sticking through it furnishes enough evidence against her and so she is arrested. Abigail's diabolical plan to get Elizabeth into trouble therefore succeeds.
Where does Mary Warren go at the end of the story?