A tragic flaw is a characteristic of a tragic hero that causes or contributes to his downfall. The flaw can be poor judgment, pride, weakness, or ambition. The tragic hero usually recognizes his tragic flaw and its consequences, but only after it's too late to change the events.
Hamlet's tragic flaw is his delay in avenging his father's death. Hamlet is still devastated by his father's death when the ghost appears to him, and he is unable to carry through with his revenge until the end of the play. Hamlet's delay in punishing Claudius not only causes his own death, but the deaths of everyone else in his life except for Horatio and Fortinbras.
Hamlet's character lends itself to a possible motivation for his reluctance in killing Claudius. He's sensitive, a scholar, and a student of theology. It's a moral dilemma for Hamlet to kill without just cause, or even to kill at all. He wants proof of the part his uncle and his mother played in his father's death. His royal birth leads him to consider his responsibilities to his country. This is Hamlet's internal conflict throughout the play. Critics still disagree with why Hamlet delays in his revenge for his father's death.
A tragic flaw is a defect in the protagonist's character that leads him/her, and often others, to ruin or at least great grief. Hamlet's tragic flaw is his inability to act.
Unlike his father, the dead king, Hamlet is ruled by his intellect rather than his bravery. When he has an opportunity to do away with Claudius, thus avenging his father's murder, he hesitates, reasoning that if he kills the man while he is at prayer, Claudius would have asked for forgiveness and have been absolved of his sins (and thus free to enter Heaven).
Hamlet reasons that he should wait for a more opportune time. His tragic flaw of having an inability to act does ultimately lead to his own death, and also the deaths of Gertrude, Ophelia, Laertes, and eventually, Claudius.