This is the use of words to mean something different from what a person actually says (www.parklandsd.org/web/smith/files/2014/01/The-3-Types-of-Irony.pdf). Examples of irony in a poem, a play, a short story or a novel, might include the following:
a. He failed all the exams. That was quite a brilliant feat.
b. My day started off on a bad note; there was no electricity, the car would not start and I had to rush to the stage to get a bus. And then it got better; just as I was about to reach the stage, the bus sped off, leaving me choking in dust.