Enotes says, "situational irony: such as when a pickpocket gets his own pockets picked."
In other words, it is when the prank backfires on the prankster, the terrorist becomes a victim of terrorism, etc...
The effects are often humorous, a kind of poetic justice: the punishment fits the crime, fitting retribution.
So says one of my favorite websites, Sarcasmsociety.com:
Situational Irony occurs in literature and in drama when persons and events come together in improbable situations, creating a tension between expected and real results. An example of this would be a scene where a man and woman are sitting at a bus stop and start to converse. The woman divulges some of her deepest darkest secrets. The man listens and advises her, and the woman thanks him and gets on her bus. After she is gone the man takes off his heavy coat to reveal that he is in fact wearing the garb of a priest. The irony lies in the fact that the woman never knew that the man she was talking to was a priest, but the audience does and the reality of what the audience knows about why the man was so helpful and understanding is different from the reality the woman experienced.