Polonius tells Gertrude what to say. She should tell Hamlet his pranks have gone too far, and that she's been covering his (Hamlet's) royal behind from getting into any real trouble.
Time for the confrontation to go down.
Gertrude reprimands Hamlet for upsetting Claudius with the play, but Hamlet turns the tables and starts attacking her for marrying her husband's brother. Hamlet is so worked up that the Queen actually gets a little worried and cries out for help.
Polonius, still behind the curtain, hears Gertrude cry, "Help, ho!," so he cries out, too: "What, ho, help!"
While this does nothing to help Gertrude, it does alert Hamlet to the fact that someone is hiding behind the curtain.
Hamlet promptly stabs the curtain-veiled man, declaring he's found a rat. Polonius' utters his last words: "O, I am slain."
Uh, says Gertrude, do you know what you've done?
Actually, no; Hamlet's not too sure what he's done.
When he finds out, he isn't too worked up about it. After all, it's no worse than a certain someone else's choice to kill a king and marry his wife.
He says that he mistook the intruding old fool for a man higher up, though it did kind of serve Polonius right for being a busybody.
While Polonius' dead body cools on the palace floor, Hamlet continues to attack his mother for her remarriage.
He points out that his father was a convenient blend of all sorts of sexy beasts from Greek and Roman mythology, while Claudius is more like a mildewed ear of grain that infects everything around it.
When you put it like that, maybe Gertrude is as crazy as Hamlet accuses her of being.
Finally, Gertrude can't take it anymore and says that she knows her soul is blackened by what she's done.
That's not enough for Hamlet, who accuses his mom of being slick with the nasty sweat of a greasy bed and being married to a crown stealer and a murderer.
Just then, the ghost shows up. (Good timing.)
Hamlet and the ghost have a little chat in which the ghost reminds Hamlet that he's got some revenge to attend to, and should probably get on that.
After all, the ghost suggests, Gertrude's probably imagining the worst right now, as her insane son talks to her dead husband, who, as far as she can tell, isn't really there.
And that's exactly what's happening: Gertrude now thinks her son is totally cuckoo.
(What's up with that? How come Hamlet's the only one who can see the ghost now? Has he totally lost it, or does the ghost choose to appear only to Hamlet?)
Hamlet begs Gertrude to realize that her remarriage was a sin and tells her to stop having sex with Claudius.
He also warns her that if she lets Claudius know that she knows that Hamlet isn't truly mad, that he's just pretending, she'll be putting herself in great danger...just like the ape that tried to fly like a bird and wound up breaking its neck. Um, yeah, we're not sure where that story comes from, but you get the point: if Gertrude spills to Claudius, he might kill her.
Hamlet then reminds his mother that he's been slated to leave for England with his "friends," Rosencrantz and Guildenstern, neither of whom he actually trusts. He says the little scheme Claudius is setting is fine, as he will basically be blown up by his own bomb.
So Hamlet has more murder and mayhem up his sleeve.
Then, lugging Polonius' corpse out, he wishes his mom a good night.