A tragedy, most simply, is the story of a character's downfall through his own mistake. However, in classical tradition, there were several components to an effective tragedy.
1 - The main character is a "great man", meaning that he is of a high social class. Very often, he will be a military or political leader. This character is the tragic hero. The character is not a totally good person, but not a totally bad person.
2 - The main character has to make a tragic mistake. This is the moment when he changes his fate and sets in motion events that will lead to his downfall. This tragic mistake is often connected to a "tragic flaw".
3 - The mistake made by the hero leads to a reversal of fortune. This is when the hero expects something good to happen but gets something bad instead.
4 - The last component is a moment of realization, when the hero understands what has happened and recognizes his own mistake.
Ultimately, the effect of tragedy is for the audience to experience pity for the hero and fear for themselves, fear that the same thing could happen to him/her. In this way, the audience learns a lesson.