Claudius has killed Hamlet's father, the King of Denmark. Hamlet's mother married Claudius two months later because she didn't know.
The guards of the castle see the ghost of Hamlet's father. And the ghost tells Hamlet that his uncle, Claudius killed him, so Hamlet went crazy.
The King and Queen think that he is acting strange because he is in love with Ophelia. So they put him in a room with Ophelia to find out for sure. But Hamlet was mean to her, so his uncle thinks Hamlet knows he killed his father and that's why he's mad.
Ophelia goes crazy because Hamlet says he doesn't love her and she drowns herself. Her brother blames Hamlet and challenges him to a duel.
At the duel, Claudius puts poison in a glass of wine and on the swords because he wants to kill Hamlet. The Queen drinks the wine by mistake and dies. Hamlet and Ophelia's brother stab one another with the poison swords and they both die, but Hamlet kills the king just before he dies.