Let me give you two different scenarios:
You are the founder of a club. Some of the other members you know well, others are only acquaintances. But one day the members all decide to get together and have a "roast" for you. At the black-tie rubber-chicken dinner, a couple of members put on a skit. The skit includes jokes and gags that poke fun at your club, and one person does a dead-on impression of the guest of honor (you). Everyone in the room is ROTFL and having a great time. It's the highlight of the evening, and everyone in the club talks about it for years afterward.
You are a girl in junior high school (that's "middle school" for you young'uns). In your history class is another girl. She seems smart -- always ready with the right answer when called upon, asks thoughtful questions. You've said hello, chatted a couple of times. She's nice and polite. One day about midyear, you're walking to lunch and you see her talking to her friends, with her back toward you. You're within earshot just as your acquaintance does a dead-on impression of one of the slower kids in your history class. The whole group erupts into laughter, and your acquaintance says, "Yeah, all the kids in that class are so ----ing stupid. They make me want to ----ing gag."
Both of the attempts at humor I've just described involve truth. After all, nothing's really funny if it doesn't ring true. But to borrow a line from Sesame Street, "one of these things is not like the other." The difference is intent. One's harmless fun, and the other is malicious gossip.