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!
To add to what Mrs. Campbell has already stated in her response to you (which is an excellent summary of the revenge plot and the way that it is ultimately carried out) there is also a bit of social commentary here on the theme of revenge as a whole. In the end, as noted, "everybody" dies - Gertrude, Claudie, and Hamlet. Therefore, revenge is served toward the murderer (Claudius), the "adulteress" (in a sense, although only in that she was married to her husband's killer) and to Hamlet himself who has murdered as well. It is a no-win situation, as is often the case when it comes to revenge. This is what makes the play a tragedy. The "hero" cannot win. He either fails to act (not very heroic) or he acts and becomes a sinner in his own right. Revenge poses a complicated moral dilemma!