Traditionally, I have always said that comedy is about the unexpected. When you create a situation where the audience expects one thing and something noticeably different happens, the response is usually to laugh. I had a great conversation with a friend recently, who brought an interesting new view of comedy.
Comedy is about pain. If you look at any joke, there is an understood pain that comes with it. The classic joke, "Take my wife...please" is funny because people understand the pain that is caused by the speaker's relationship. Basically all of Rodney Dangerfield's comedy is based on the pain of him having no respect. When somebody makes a joke about how Jay Leno is awful, the pain is having to actually listen to him tell jokes.
If people don't laugh at your comedy, it could be for a number of reasons. But if people specifically "don't get it", it usually means that they don't understand the pain in the joke. To use a previous example, if I make a joke like, "I would rather be waterboarded with cat pee than listen to Jay Leno try to do comedy", it isn't funny if you've never actually seen The Tonight Show. He's just some guy, it's just some name. If the audience doesn't share or at least understand the pain, then there is no comedy.
Go out and listen to jokes through this lens. Every time you see comedy, look for the pain. Sometimes it's really subtle. But when you can see the pain, you can see how comedy has a much deeper level than simply being about the unexpected.