As Spacebaboy said, there will be times you cause others pain. This is unavoidable. So long as it is unintentional it can be forgiven (and learned from, so it does not happen again). However, what you want to be trying for is to give others pleasure. Once you find what makes people happy you will want to do it again (giving pleasure is an enjoyable experience in itself). However, do not go too far in making people happy, as it can end up spoiling things. For example, I like Boursin cheese. I will only get it every couple of months or so. If I got it every week the attraction would soon fade.
One thing I am know for is telling jokes (though they are, sometimes, groaners). Once I told a colleague a medically related joke. He flipped out, and was close to hitting me. This seriously strained the atmosphere at work, and it took him a week before I could talk to him again. The first thing I did was to apologise. I then asked what I had done that caused him so much pain. He looked at me, and asked if I had known about his brother. I did not, and I told him this. It turned out that, a couple of years earlier, his younger brother had been playing in a football match when he collapsed and died (from the medical condition in the joke). I was mortified, and he could see that. It took a little more time, but we ended up remaining friends. While I still tell jokes, I never tell him medical jokes (unless he starts with them himself, and even then I am very careful).