Abigail stabs herself with a needle. She does this in order to cast suspicion on Elizabeth Proctor. If Elizabeth Proctor is convicted of witchcraft, then Elizabeth will be executed. John will once again be a single man, and Abigail thinks that she and John can be intimate together again.
The doll and needle sequence occurs in Act 2. Mary Warren arrives at the Proctor household with a "poppet." Soon after, Reverend Hale and Cheever show up and discover that the poppet has a needle stuck in it. In Cheever's opinion, the doll signifies that Elizabeth used witchcraft/black magic/voodoo/etc. on the doll which caused Abigail to stab herself with a different needle.
Cheever, wide-eyed, trembling: The girl, the Williams girl, Abigail Williams, sir. She sat to dinner in Reverend Parris's house tonight, and without word nor warnin' she falls to the floor. Like a struck beast, he says, and screamed a scream that a bull would weep to hear. And he goes to save her, and, stuck two inches in the flesh of her belly, he draw a needle out. And demandin' of her how she come to be so stabbed, she - to Proctor now - testify it - were your wife's familiar spirit pushed it in.
The doll and the needle, both being in the Proctor's house, are seen as definitive proof that Elizabeth is practicing witchcraft. What's amazing is that the "proof" is so easily discredited. Mary Warren openly admits that the doll is hers. She explains that she made it while sitting in court, and she explains that she put the needle in it for safe keeping.
Mary Warren, glancing about at the avid faces: Why - I made it in the court, sir, and - give it to Goody Proctor tonight.
Proctor, to Hale: Now, sir - do you have it?
Hale: Mary Warren, a needle have been found inside this poppet.
Mary Warren, bewildered: Why, I meant no harm by it, sir.
Proctor, quickly: You stuck that needle in yourself?
Mary Warren: I - I believe I did, sir, I -
Mary also explains that Abigail Williams saw her do all of this.
Mary Warren: Ask Abby, Abby sat beside me when I made it.
Proctor wants Mary to go to the court and explain the entire thing. That would show Abigail as a liar, and the suspicions against Elizabeth would end. Unfortunately, Mary is too frightened of Abigail's power.
Mary Warren: She'll kill me for sayin' that!