How Does Irony Work In Literature?

How is irony used in literature?

.