A tragedy is a drama (or more loosely any event) with an unhappy ending, and more specifically a form of drama popular first in Ancient Greece and then Elizabethan England.
While the tragedies of Greek theater derived their pathos from the inevitability of the fate of the main character (since mortals were mere playthings of the Gods), those of Shakespeare arguably surpassed this - the tragedy came from a flaw in the personality of the main character. In this way important questions were raised about the free will of the character - could, for example, Macbeth have chosen to be content with his position, rather than submit to his 'overvaulting' ambition?
Well known Greek tragedians include Aeschylus, Sophocles, and Euripides.
William Shakespeare's best-known tragedies are Hamlet, Prince of Denmark, Romeo and Juliet and Macbeth. Others include Julius Caesar, Titus Andronicus, Troilus and Cressida, Othello, King Lear, Antony and Cleopatra, Coriolanus and Timon of Athens.
A subvariation of tragedy is tragi-comedy - this can be used to describe people with limited intelligence and no self-awareness who embark on doomed endeavours based upon a ludicrously simplistic view of the world, for example Don Quixote. Ricky Gervais in particular can be considered a master of contemporary tragi-comedy, although non-fictional examples are not necessarily lacking.