The notion of a "tragic flaw" is based on Aristotle's definition of tragedy in his Poetics. There, Aristotle argues that the protagonist of tragedy should be neither completely good nor completely evil, but:
...the character between these two extremes- that of a man who is not eminently good and just, yet whose misfortune is brought about not by vice or depravity, but by some error or frailty.
This "error" is what is popularly known as a "tragic flaw," and takes the form of a mistaken judgment or action, usually stemming from some weakness of character (but not extreme vice or evil).
In Shakespeare's Hamlet, the protagonist discovers that his uncle Claudius has killed his father and married his mother. The ghost of his father urges him to seek vengeance and kill the usurper. Hamlet is somewhat reluctant, but gradually becomes convinced of the justice of this course of action, and does it. While his tendency towards melancholy and indecisiveness can be considered a flaw, it is not precisely a tragic flaw in the sense of something leading him in the wrong direction. He acts as would be expected in his era, given his social position.
Othello possesses two flaws. First, he is overly prone to jealousy, "the green-eyed monster", leading him to be willing to listen to Iago's poisonous lies. Second, as Othello himself has a simple, honest character, he isn't always aware of when he is being lied to, and tends to take people at face value, making him easily manipulated by Iago. Neither of these characteristics are shared by Hamlet, who is rather subtle and devious. Although Othello's murder of Desdemona was morally wrong, much of the blame falls on Iago.
Macbeth, unlike Othello and Hamlet, is consumed by ambition (a character flaw), and himself becomes evil as his ambition leads him to unambiguously unethical actions.