John Proctor drags a reluctant Mary Warren to court so that she can testify that what the girls are doing is all an act. His wife, Elizabeth, has been arrested on a charge of witchcraft after a poppet that she supposedly used to harm Abigail Williams is found in their home. Mary tells John that she made the doll and that Abigail saw her doing so. She also mentions that she and the other girls have been deceitful and that their evidence is a sham. Her testimony, if believed, will set Elizabeth free and expose the girls as liars.
In Act 1, Abigail Williams promised all the girls a "pointy reckoning" if any of them should reveal the truth. When Mary appears in court, she is anxious about Abigail's threat and fears the other girls' hatred and rejection. John Proctor tells the court that Mary has signed a deposition declaring that "she never saw no spirits." When Judge Danforth asks her about it, Mary tells him that "it were pretense."
It is only later in the hearing that Mary is again confronted directly about her deposition. She has just witnessed Giles Corey and Francis Nurse being severely criticized for not wanting to provide the names of those they have mentioned in their statements. She is apparently overwhelmed by the proceedings and feels vulnerable and scared. Furthermore, the other girls are called back into court, and Abigail has vehemently denied Mary's version of events about the poppet. Reverend Parris then asks Mary to faint as she has done so many times before. Judge Danforth also insists that she does the same.
Mary tells Danforth and Parris that she cannot faint because she has "no sense of it." She explains that she had been able to do so because she believed that she saw spirits. She attempts to recreate the emotion that she experienced during those episodes but cannot regain it. Mary informs the court that she heard the whole group of girls crying out "spirits, spirits" and that she was taken in by their frenzied cries.
All the above factors are the reason for Mary not being able to faint. Furthermore, it was much easier in the past because she was caught up in the mob frenzy generated by the other girls. She could easily copy what they were doing. Now, however, she is on her own. She is intimidated by what she has already witnessed and is fearful. Because there is no one to support her, she cannot relive the emotions that she so easily expressed when she was part of a group doing the same thing. In her isolated and frightened position, it has become impossible for her to repeat what she found so easy to do earlier.
It is quite ironic that Judge Danforth mentioned earlier that the girls were God's instruments but that he now rejects the truthful testimony of one such instrument. Further irony lies in the fact that Mary later turns on the one who relies on her and believes her, John Proctor. The pressure exerted by the other girls becomes too much. When they, once again, put on an act and turn on her, she relents and accuses John of trying to get her to sign the Devil's book. John is accused of witchcraft and is arrested.
I think you are referring to the part in Act III when Mary is asked to faint like she had done in court on the other days. Mary now says she was pretending to faint, so Danforth wants her to pretend to faint now. Mary can't pretend to faint at this point because she isn't caught up in the moment of court when the other girls are screaming, and "the whole world cried spirits, spirits,. . ." Mary follows the lead of the other girls, screaming and crying and pretending to see spirits. "I--I heard the other girls screaming, and you, Your Honor, you seemed to believe them, and I--It were only sport in the beginning, sir,. . ." It was fun at first for Mary, but she never dreamed the girls would be believed by the adults. When the ministers and judges believed what they were saying, the girls took it farther because now they had power, something Puritan children usually did not have. Mary realizes she can't convince the court it was all pretense when Abby and the other girls start accusing her of being a witch.
Mary is terrified of the retribution Abigail promised in Act One. It was fine to confess to John when Abigail was not around, but now Mary is in public, in the courtroom, and becomes terrified of Abigail and what others in the community may say.