We meet Hamlet during an official ceremony where Claudius, the new King, is dealing with court business. Claudius and Gertrude try to convince Hamlet not to be so gloomy. Fathers die all the time; he needs to get over the death already.
Hamlet soliloquizes about how he wishes he could commit suicide because his mother's remarriage has made the whole world seem corrupted.
Hamlet's friend Horatio tells him his father's ghost has been spotted walking on the castle battlements. Cool! Hamlet decides to go see.
Hamlet follows the beckoning finger of his father's ghost, who tells him that his brother murdered him in order to steal his wife and his crown. Hamlet vows revenge, and swears the men to secrecy about seeing the ghost.
Months later, Hamlet is wandering around the court acting crazy and mocking Polonius at every opportunity. He perks up when his friends Rosencrantz and Guildenstern show up, but soon realizes they are on the payroll of the King and Queen. Bummer.
A bunch of actors Hamlet knows from Wittenberg show up; he greets them enthusiastically and asks one actor to do a speech he remembers about the death of the King of Troy and the grief of his wife, Hecuba. The actor gets so worked up he starts to cry.
Hamlet yells at himself in a soliloquy about how the actor can weep for a pretend murder but he hasn't done anything about his father's real murder. He decides to use the actors to stage a play of his father's murder so he can see Claudius's reaction.
Hamlet returns to the theme of suicide: "To be or not to be, that is the question." (What, you've heard that before?) He soliloquizes about how the fear of the afterlife forces people to deal with the harsh realities of life rather than escaping them.
Next, our anti-hero runs into Ophelia, whom he hasn't seen for a long time. He tells her he once loved her, then tells her he never loved her. Way to jerk a girl around! He accuses Ophelia of being dishonest and verbally abuses her.
Hamlet tells the actors how he wants them to perform, and what kind of acting they should avoid (namely, the bad kind).
When the court comes in to see the play, Hamlet sits by Ophelia, makes crude sexual jokes, and talks about the faithlessness of women. Charming!
Claudius is clearly disturbed by the poisoning scene in the play, and Hamlet is triumphant that his plan has worked. He tells Rosencrantz and Guildenstern that he knows they're on the wrong side.
Hamlet stumbles across Claudius praying and repenting. He almost kills him right there, but then decides that Claudius needs to go to Hell when he dies, so he'd better wait for a moment for him to commit sin, rather than murdering him while he's praying.
Hamlet confronts Gertrude about her sinful marriage to Claudius and accidentally stabs and kills Polonius, thinking he is the King. Oops.
Claudius forces Hamlet to tell him where Polonius's body is, then sends Hamlet away to England (to die).
Doesn't work: on his way to England, Hamlet sees Fortinbras's army marching off to war and is inspired to stop delaying and to carry out his revenge.
Returning to Denmark, Hamlet walks through the palace graveyard and gets all depressed again about how people die —like Yorick, a court jester he loved, but who died when he was a child. When the court comes to the graveyard to bury Ophelia, he and Laertes fight over who loved her more.
Hamlet tells Horatio everything: Claudius had tried to have him killed, he replaced his own name with Rosencrantz and Guildenstern's names on the death warrant, and then escaped.
Laertes sends a message challenging Hamlet to a just-for-fun swordfight. Hamlet has a bad feeling about it, but accepts.
In the not-so-fun swordfight, Hamlet kills Laertes and finally stabs and poisons Claudius, then dies himself of the poisoned wound Laertes gave him.
Hamlet asks Horatio to tell his story and suggests that Fortinbras become the next King of Denmark, a job, at this point, that no sane person would want.