Irony is created when things happen the opposite of what is expected to happen. An example can be a situation in which the actors don't know what is happening while the people who watch it know what is happening. Someone is scheming in a different scene and we, the audience, know this, but the other characters in a play don't know this.