Hamlet is primarily a thinker, not a doer. He's not someone who's about to grab his sword and immediately run off to kill Claudius; that's just not who his character is. He's a thoughtful young man, prone to extended bouts of brooding introspection. Hamlet knows what must be done—he knows that he must avenge the death of his murdered father—but he must do so in a way that allows him to reconcile his twin roles as Christian and prince.
This largely explains why Hamlet spends such a great deal of time procrastinating instead of acting. He's caught in the middle between his duties as a Christian and as a prince. His Christianity tells him that killing is wrong, but his princely duties impress upon him the necessity of settling accounts with Claudius.
There are several reasons for this. First of all, Hamlet argues that he does not know whether or not he can fully trust that the ghost was really his father's spirit and not just a demonish spirit trying to trick him (Elizabethans would most likely have believed this to be a possibility). This is why Hamlet sets up thje play-within-the-play to test Claudius. Once Hamlet sees teh reaction from Claudius that proves to him his uncle is, in fact, the murderer, he still delays murdering Claudius. This is mainly because he stumbles across Claudius praying and decides he can't kill him during paryer since it would possibly send him to heaven, and not to purgatoy, which is where his poor father is suffering.
Many critics argue that all this inaction is based on convenient excuses, however, that simply allow Hamlet to continue to waffle on the issue, establishing inaction and indecisiveness as character traits on his part.