The simple answer to the question is that he kills Claudius (his uncle, who had killed his father). However, this doesn't happen until the very end of the play, and only after Hamlet spends most of the play procrastinating that very action. Specifically, he is in a swordfight with Laertes, who Claudius has conspired with to kill Hamlet. Laertes has poisoned the tip of his sword so that when it cuts Hamlet it is a guranteed kill. Claudius, however, has also poisoned some wine, that he plans on giving Hamlet in a toast. So, Hamlet is being attacked from multiple directions. Unfortunately, Gertrude (Hamlet's mother), drinks from the poisoned wine and dies; Hamlet realizes what happened, and stabs Claudius, finally. Hamlet, Laertes, Claudius and Gertrude all die in that final battle--classic Shakespearian tragedy.
The ghost told Hamlet to enact his revenge in the opening scenes of the play; Hamlet wants to make sure that Claudius did in fact kill his father, so sets about trying to figure it out. He also hums and haws over killing someone, and passes up numerous chances to kill Claudius throughout the play. It isn't until the end, after he has resolved to stop "unpacking [his] heart with words," that he finally decides to act, and that is when everyone dies. I hope that those thoughts helped; good luck!