I have no idea. Distant whisperings from the aether.
I guess fundamentally good humor is about processing information in interesting ways, usually in order to illuminate some noteworthy trait about the topic in question. I used to enjoy going around talking about how comedy tried to reach some higher truth in some safe, largely innocuous way. I'm not really sure this is the case, even though it can be.
Here is an interesting example:
http://www.youtube.com/watch?v=qmXacL0Uny0Nothing is really being conveyed here. It's a cockeyed comparison of two sports which isn't really illuminating anything of note. But what's effective here is his use of language, juxtaposition, and presentation to show something not at all interesting in a very engaging and entertaining way. Give the transcript of this to someone who reads things aloud in a very robotic, stilted manner, and you have something that isn't very funny. Read either the baseball or football descriptions on their own, and you also get something near totally empty. The extremes Carlin reaches with language here aren't really terribly inventive on their own, but it becomes pretty good stuff when you see how the words bounce off each other and how he illustrates them with body language and changes in his voice.
I would say as important to the conceptual grounds of comedy is the method it's being delivered. You could have a really good joke, or something earnestly funny, but told in poor or unsophisticated ways, the joke could be totally ruined.
Here's a truly phenomenal example:
http://www.youtube.com/watch?v=lCixAktGPlgExact same joke, told once by a genuinely gifted performer, told again by someone that is a very low-functioning autistic jerkoff. The joke isn't really intrinsically funny, and it only works in Cosby's case because his examples along the way are funny and his pacing and payoff builds up carefully. But then Mencia does it and relies wholly on the joke itself being funny, exhausting you before the punchline has even been delivered, failing to make the buildup to the joke itself interesting or even peripherally nuanced. Presentation is the key here, and the reaction each has after the joke will tell you everything you know about comedy. Cosby's long pause, and pained, almost hurt reaction, compared to Mencia screaming at the top of his lungs before you've even been able to process the information or react to the joke, almost as though his unpleasant screaming is supposed to be the joke. Cosby's reaction works here, because that's the reaction you expect a father to have, and the comedown from the energy of the buildup is excellent. Mencia's reaction doesn't work here, because you can't believe someone who would have that reaction could possibly have children in college before the state deems them unfit for parenthood and takes the kids away. Cosby works and has good aesthetics, Mencia leaves you feeling like you've just been shit on by an arrogant stranger.
So basically the secret behind comedy is that if you like Carlos Mencia you have a bad sense of humor and should be euthanized.