Irony is the difference between what is being said and what is being meant.
English writer Anne Bradstreet used several instances of irony in her poems, mostly to mock society's assumptions as regards the role of women. For example:
"Who says my hand a needle better fits"
In the example above, Bradstreet refers to how society constrains women to do housework chores.
Usually what element helps you identify the theme of a story is what lesson the main character learns, or any important idea or refrain throughout the story.