TL;DR: Hamlet sees his dead dad's ghost, pretends to go crazy with revenge, actually goes crazy with revenge (debatable), and everyone dies.

Hamlet Summary The ghost of the King of Denmark tells his son Hamlet to avenge his murder by killing the new king, Hamlet's uncle. Hamlet feigns madness, contemplates life and death, and seeks revenge. His uncle, fearing for his life, also devises plots to kill Hamlet. The play ends with a duel, during which the King, Queen, Hamlet's opponent and Hamlet himself are all killed.

More detail: 2.5 minute read Act I Late at night, guards on the battlements of Denmark's Elsinore castle are met by Horatio, Prince Hamlet's friend from school. The guards describe a ghost they have seen that resembles Hamlet's father, the recently-deceased king. At that moment, the Ghost reappears, and the guards and Horatio decide to tell Hamlet. Claudius, Hamlet's uncle, married Hamlet's recently-widowed mother, becoming the new King of Denmark. Hamlet continues to mourn for his father's death and laments his mother's lack of loyalty. When Hamlet hears of the Ghost from Horatio, he wants to see it for himself. Elsewhere, the royal attendant Polonius says farewell to his son Laertes, who is departing for France. Laertes warns his sister, Ophelia, away from Hamlet and thinking too much of his attentions towards her.

This above all: to thine own self be true. — Hamlet, Act 1 Scene 3

The Ghost appears to Hamlet, claiming indeed to be the ghost of his father. He tells Hamlet about how Claudius, the current King and Hamlet's uncle, murdered him, and Hamlet swears vengeance for his father. Hamlet decides to feign madness while he tests the truth of the Ghost's allegations (always a good idea in such situations).

Royal Shakespeare Theatre, 1984

Act II According to his plan, Hamlet begins to act strangely. He rejects Ophelia, while Claudius and Polonius, the royal attendant, spy on him. They had hoped to find the reason for Hamlet's sudden change in behaviour but could not. Claudius summons Guildenstern and Rosencrantz, old friends of Hamlet to find out what's got into him. Their arrival coincides with a group of travelling actors that Hamlet happens to know well. Hamlet writes a play which includes scenes that mimic the murder of Hamlet's father. During rehearsal, Hamlet and the actors plot to present Hamlet's play before the King and Queen. Act III At the performance, Hamlet watches Claudius closely to see how he reacts. The play provokes Claudius, and he interrupts the action by storming out. He immediately resolves to send Hamlet away. Hamlet is summoned by his distressed mother, Gertrude, and on the way, he happens upon Claudius kneeling and attempting to pray. Hamlet reasons that to kill the King now would only send his soul to heaven rather than hell. Hamlet decides to spare his life for the time being.

Royal Shakespeare Company, Courtyard Theatre, 2008

Polonius hides in Gertrude's room to protect her from her unpredicatable son. When Hamlet arrives to scold his mother, her hears Polonius moving behind the arras (a kind of tapestry). He stabs the tapestry and, in so doing, kills Polonius. The ghost of Hamlet's father reappears and warns his son not to delay revenge or upset his mother.

What a piece of work is man! — Hamlet, Act 2 Scene 2

Act IV Hamlet is sent to England, supposedly as an ambassador, just as King Fortinbras of Norway crosses Denmark with an army to attack Poland. During his journey, Hamlet discovers Claudius has a plan to have him killed once he arrives. He returns to Denmark alone, sending his companions Rosencrantz and Guildenstern to their deaths in his place. Rejected by Hamlet, Ophelia is now desolate at the loss of her father. She goes mad and drowns.

Royal Shakespeare Company, Swan Theatre, 2006

What dreams may come when we have shuffled off this mortal coil, must give us pause. — Hamlet, Act 3 Scene 1