The ghost tells Hamlet that he is, in fact, the ghost of his dead father. And there's more: the ghost claims that Claudius killed him, taking his throne and his wife in the process. He wants Hamlet to kill Claudius in revenge. Shocked, Hamlet agrees and vows to avenge his father's death.
Hamlet gets cut by Laertes sword and in anger cuts him back. The Queen's death encourages Laertes to reveal Claudius' plot. Hamlet takes his revenge on Claudius. He stabs him with the poisoned sword and makes him drink the poison.