I was thinking, video, bunch of posts with links, but figure nah, lets keep this basic.
If someone says your being an asshole for doing something, just stop doing it. If you don't get why they are bothered by it and would like to know more, ask them politely what you did/said that was offensive. And listen, don't try to judge the merit of what they said, just absorb it to think about over time.
What worked for me is to realize that my defensive "I was just joking" and being offended someone could be mad at me, was just me being a dick and not wanting to admit it.