When Hamlet goes to talk to Gertrude, he hears someone behind the curtain, he immediately believes it is Claudius. Hamlet is still upset over his father's death, as he believes Claudius is guilty, so he stabs through the curtain. However it results in Polonius being the hidden figure.
Oh, what a rash and bloody deed is this!
Act 3 Scene 4: Hamlet kills Polonius. (what)
A bloody deed? Almost as bad, good mother, as kill a king and marry with his brother.
Act 3 Scene 3: Hamlet decides against killing Claudius. (what)
Now might I do it pat. Now he is a-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. Oh, this is hire and salary, not revenge.
Hamlet finds Claudius while he is asking for forgiveness for the murder of his father, and because Hamlet doesn't want him to go to Heaven, he doesn't murder Claudius during his time of forgiveness. He believes it would be a favor to do so.
Act 3 Scene 2: Claudius leaves the play. (what)
He poisons him i' th' garden for s' estate. His names Gonzago. The story is extant, and writ in choice Italian. You shall see anon how the murderer gets the love of Gonzago's wife.
The play they were watching recreated the murder of Claudius's brother, and had the purpose of confirming the guilt Claudius possessed for murdering his brother.