The use of irony in literature refers to playing around with words such that the meaning implied by a sentence or word is actually different from the literal meaning. Often irony is used to suggest the stark contrast of the literal meaning being put forth. The deeper, real layer of significance is revealed not by the words themselves but the situation and the context in which they are placed.
Writing a sentence such as, “Oh! What fine luck I have!”. The sentence on the surface conveys that the speaker is happy with their luck but actually what they mean is that they are extremely unhappy and dissatisfied with their (bad) luck.