Hamlet follows the King out and hears his confession about killing Hamlets father. Hamlet wants to kill him, but he doesn't want to kill him while he is praying because it would send the "villain" to Heaven.
"Now might I do it pat, now he is praying, And now I'll do 't. And so he goes to heaven, And so am I revenged. That would be scanned: A villain kills my father, and for that, I, his sole son, do this same villain send To heaven."
"O, my offence is rank, it smells to heaven; It hath the primal eldest curse upon 't, A brother's murder."
Hamlet goes to his mothers closet to see why she has called upon him. They talk and when she starts crying for help, Polonius speaks up and calls for help and then Hamlet stabs him behind the curtain.
“How now! a rat?”
"What, ho? Help, help, help!"
Hamlet is not fazed that he killed Polonius at all while his mother can not believe her eyes.