In Act One, Mary Warren is portrayed as a sniveling, whiny scaredy-cat that has no spine of her own. She cowers when anyone speaks harshly towards her, and is quick to try to get out of being blamed for doing anything wrong. She wines to Abby and the others, "We've got to tell--witchery's a hangin' error," and goes on to whine, in regards to the dancing and spell-casting that was done in the forest, "I never done none of it...I only looked!" When John Proctor, who employs her as a servant, comes in, she cowers before him as he demands that she goes home. She obeys immediately without argument.
In Act Two, it is quite a different Mary that we see. Gone is the scared, whiny commendable girl; in her place, she shoes uncharacteristic gumption, importance and strong will. When John Proctor threatens to whip her for disobeying, instead of cowering and whining in fear, she stands up to him and states boldly, "I'll not stand whipping any more!" When he tells her to go to bed, she resists, asserting her independence: "I'll not be ordered to bed no more." So, she has found her spine, and uncharacteristically sticks up for herself in the face of authority. Another aspect of Mary that is changed is that she relates how in front of the entire court, she testified against Goody Osburn. This is strange for her to have done, considering in act one she had been terrified to be in the spotlight, and to have been seen doing anything unusual. But, she gets up there and faints dead away, then testifies of Osburn supposedly casting a spell on her. This requires guts, and Mary didn't have them before.
The reason for Mary's new-found confidence and gumption is her increasing attention as "an official of the court." She feels, for the first time, important, looked to as having weight in the town, and what she says is taken very seriously, as truth. She gets a bit giddy on this attention and power, and uses it to show new confidence in herself. Because the courts regard her as an important witness, she regards herself as important also, which accounts for her change in behavior.
I hope that those thoughts help a bit; good luck!