JOKES were meant to be funny and to lighten things up. They're said to bring colors to someone's dull day. Joke comes in different forms and are delivered in different ways, verbally most often. Sometimes we tend to crack jokes by using someone's misfortunes or flaws. I'm not saying that's wrong because it depends on the people you're making fun of and the people who are listening to your joke. Some are "game" and has no limits when it comes to receiving jokes as long as everyone are having fun. Some gets hurt but chooses to keep it to themselves because they don't want to spoil the moment or cause any issues within the group. But there are really people who can't keep and manager their emotions well. They tend to explode when the jokes being thrown at them gets below the belt and too humiliating to take.
Before making jokes, make sure that you know the people around you too well. What kind of people are they? Of course, you wouldn't want to say green jokes in front of religious and conservative people, would you? I highly advised that you joke around with people who knows you to well. The chances of them getting offended is a bit low since they're already aware of your brand of humor. But that doesn't give you the right to be insensitive because it doesn't mean that they wouldn't get offended especially if your jokes aren't funny at all.
Furthermore, you should also know how to handle jokes when they're thrown at you. Yes, when you're a fan of joking, the chances are it would backfire to you. Your friends would most likely turn your jokes back to you. Most friends love to tease each other because it's ther idea of fun, and that is fine if you're going to ask me. Just make sure to avoid annoying or offending anyone. So, when it's their time to make fun of you, extend your patience and show some much-needed sportsmanship. Don't get offended as much as possible. How? Think of it as JUST a joke. Don't take it too seriously, NEVER let it get into your nerves.