The word comes from the Greek, and according to Aristotle in Poetics refers to a character flaw. The concept may relate to actions based on character, like mistakes, or 'sins' based on character. The term was first used in context with theatrical characters, and the usage has continued in various forms as a depiction of weaknesses. The 'flaw' theory was created by Aristotle, and it's since come under criticism. Hamartia literally means 'error, offence, or missing'. Modern writers refer to it as 'error', a mistake which causes disaster on the part of a character. (It's a matter of opinion whether idiomatic Greek in Aristotle's time didn't include some sort of theatrical slang idioms as well.)
Examples of Hamartia:
Romeo and Juliet
An 1870 oil painting by ford madox brown depicting Romeo and Juliet's famous balcony scene.