It's a long article, so if you give up reading it partway, here's an excerpt of a post from Slashdot reader lgordon, who provides a definition of "irony" from the book "An Incomplete Education":
"Unlike wit, its meaning, or rather bundle of meanings, has held fairly steady over time: Always it's implied that there are two sets of listeners keyed in to the same statement, story, or piece of information, and that one of them gets it--sees it for what it is, in all its poignancy or complexity or awfulness--and the other one doesn't. If you're in the former set, congratulations: The ability to recognize irony, expecially in writing (where there are no facial expressions or vocal inflections to help it, and you, along), has for centuries been regarded as one of the surest tests of intelligence and sophistication." -- An Incomplete Education, J. Jones & W. Wilson, (c) 1987
According to lgordon, the book defines the five types of irony: Socratic, dramatic/tragic, romantic, cosmic and verbal, which he summarizes:
Socratic : asking pointless, naive questions while feigning ignorance to blast holes in the victim's belief system, dogma, etc.
Dramatic/tragic : The audience knows something that the character's on stage do not. Ex: Oedipus vows revenge on the murderer of his father, and everyone in the audience gasps. (In case you skipped fourth grade that week, Oedipus killed his father without realizing it...)
Cosmic : God mocks or sports with mortals. Like in "Clash of the Titans," where Zeus and Hera are playing games with the little clay figurines...
Romantic : Where the author reveals that the characters are fictions created and manipulated by him. (Sort of jumping back to the meta-level while in narrative). I wonder if the woman at the beginning of "Hitchhikers" (whose story it was not about) would qualify as this...
Verbal : Using juxtaposition or understatement to say something which (sometimes) may be vague enough to leave you wondering exactly what the intended meaning is. Ex: Calling a 500 pound athlete "Tiny" is irony, in and of itself. It would be "extra special ironic" if you were calling him "Tiny" when the prevailing rumor says that he has undersized genitalia. It would be even more ironic if "Tiny" called himself "Tiny" without knowing about the rumor.
I also liked the example Slashdot reader xYoni69x provided from George Carlin's book "Brain Droppings":
Irony deals with opposites, it has nothing to do with coincidence. If two baseball players from the same home-town, on different teams, receive the same uniform number, it is not ironic. It is coincidence ... If a diabetic, on his way to buy insulin, is killed by a truck, he is a victim of an accident. If the truck was delivering sugar, he is the victim of an oddly poetic coincidence. But if the truck was delivering insulin, ah! Then he is the victim of irony.