Authors use irony as a literary device to make readers think about something or to emphasize a point in the story. For irony to be used correctly, the reader must be able to clearly understand the difference between what is being said and what is expected.
One type of irony that authors can use is dramatic irony. With dramatic irony, the reader knows more about the reality of a situation than the characters. For dramatic irony to work correctly as a literary device, the reader has to have more information than the character. The irony occurs when the character makes decisions and acts on information or beliefs that the reader knows to be incorrect.
Authors can also use structural irony. This literary device works when there is a character present, usually a hero or other main character, whose judgment is limited by personal goals, prejudices or a shortage of information. Structural irony must be carried throughout the story to be effective. A third type of irony available to authors is verbal irony. Verbal irony occurs when the words of a character have an implicit meaning and a very different underlying meaning. Verbal irony is used to encourage readers to think about the meaning of a character's words beyond simply the face value.