There are actually three types of irony: dramatic, situational, and verbal.
Dramatic irony is when the reader or the audience knows something that the characters don't know. For example, the audience might know that someone is waiting around a corner with a knife when a character walks in, but that character doesn't know that he's about to be attacked.
Situational irony is when something unexpected happens after full efforts to avoid or create the situation occur. For example, if a bride purposely plans to have her reception indoors because there is a chance of rain on her wedding day, but then the sprinkler system in the reception center goes off and everyone gets wet anyway, that's situational irony.
Verbal irony can sometimes be taken as sarcastic, but it is when a name or adescriptong of someone or something shows the opposite of what is real. For example, a boyfriend calls his girlfriend "Tubby" when she is really skinny.
The general term "irony" means a contrast between two things. Two kinds of irony include irony of situation and verbal irony. Irony of situation is a contrast between what is expected and what happens. For example, a consistent cheater gets cheated on. Verbal irony is a contrast between what is said and what is meant, as in a student who says "I just looooove getting up early to go to school." Of course we can tell that what he meant is nothing like what he said.
Dramatic irony is a contrast between what a character knows and what we (the readers or audience) know.
The words and actions of the characters therefore take on a different meaning for the audience or reader than they have for the play’s characters.
Cartoons are full of dramatic irony. For example, think about a guy who has his hands full of packages; he is walking along and there is a banana peel lying right on the sidewalk ahead of him. We know what's going to happen next, but he does not. That is dramatic irony, and that is funny. His impending painful fall amuses us even more because we know what is going to happen and he does not. It would be even better if this guy were assuring his wife that he would not fall just as he falls.
A more serious and literary example is when Oedipus curses whoever is responsible for bring a curse on his city; he also curses anyone who has let that person stay in his house, even unknowingly. What we, the readers and audience, know is that he is the one who has done these things and he is actually cursing himself. This knowledge adds to our appreciation for the work. Dramatic irony is used in many literary works as well as movies and, of course, cartoons.
Dramatic irony is established when the audience knows information that a character in a play, story, etc. does not. For example, in Romeo and Juliet, the audience knows that Juliet is not dead when Romeo comes to her tomb, but he does not and kills himself, thus creating irony. Another example can be found in Othello. The audience knows from the beginning that Iago is plotting against Othello, but he remains unaware of Iago's treachery until the end of play when he realizes that he killed his wife based on false accusations created by Iago.
Dramatic Irony is a literature device that is used when the audience or reader knows something that the characters do not know. This often times used in plays but in prose as well. An example of this would be in William Shakespeare's Othello, where the reader/audience knows that Iago is a villain (which is revealed through his soliloquies), however, the other characters do not find this out until the end of the play.
Dramatic Irony is when the reader has more knowledge than the characters in a story.
Dramatic irony is the dramatic effect achieved by leading an audience to understand an incongruity between a situation and the accompanying speeches, while the characters in the play remain unaware of the incongruity. In other words, it is when the reader/ audience knows about something the character does not.