1) Hamlet becomes very sad after his father's mysterious death and his mother's quick marriage to his uncle Claudius, who becomes the new king.
2) Hamlet's friend Horatio tells him that the guards have seen the ghost of Hamlet's father. That night, the ghost appears to Hamlet and says that Claudius murdered him.
3) Hamlet decides to pretend madness to investigate Claudius's guilt without arousing suspicion. When a play resembles the murder of Hamlet's father, Claudius's reaction confirms his guilt.