What is a "joke"?

I think some of the most interesting theories on “Why do laugh,” are the “evolution theories”. These try to explain how/if laughter plays a part in our evolution (does it promote survival/reproduction, or is it just a side effect/fluke?).
There are a few theories out there that claim laughter developed as a way to help promote group bonding (and hence group cooperation, etc. and increased chance of survival). We are much more likely to laugh in social situations than by ourselves, and most laughter occurs in group-playfulness-type situations than at jokes. Some people think the true laugh is the arrogant laugh. This “arrogance laugh” can be used to confirm yourself as part of the “in group”, often by laughing at others outside the group. This is especially obvious in regards to slapstick humor or dumb blonde jokes, but even laughing at more “refined” humor can be a small act of arrogance–I’m clever enough to understand your witty joke. Yay, we’re both in the cool smart people group! This would also explain why inside jokes are funniest (as long as you are in on them) but hearing others laugh when you are not in on the conversation can be downright obnoxious. It even helps explain why laughter is contagious.

A good article that touches on some of these ideas and other aspects of laughing can be found here