Hamlet discovers that it was his uncle who was at fault for the death of his father. "The serpent that did sting thy father's life/ Now wears his crown" (1.5)
Hamlet determines that he must seek revenge on Claudius by killing him.
Hamlet decides that in order to seek his revenge on Claudius, he must act like he is mad to avoid people questioning him as he plans his revenge. "Though this be madness, yet there is method in't" (2.2)
Hamlet stages a play for Claudius to watch that re-enacts how he poisoned his father. Hamlet plans to kill Claudius while he is praying but doesn't end up doing it because he worries that if he does Claudius will go to heaven.
Hamlet confronts his mother about what Claudius did. While talking to his mother he senses someone behind the curtain. He believes that the person is Claudius and stabs his sword through the curtain. Polonious was the one behind the curtain and was killed by Hamlet.
Hamlet escapes being hanged and returns to Elsinore to continue his search for revenge against Claudius. Meanwhile Laertes had come back to the kingdom and discovered that Hamlet had killed his father and that his sister is dead. He plans to get his revenge against Hamlet through a duel. "But my revenge will come" (4.7)