As much as a person might say, "I don't care what other people think," their thoughts still affect us. Wanting to belong is a big part of human nature, and when others insult us, they are say at that moment in time that we don't belong. Even if the insults are "jokes" their is still an element to that negativity that touches our soul.
I think it has to do with the need to be liked and also our self esteem. The insult makes us start looking at ourselves and doubting ourselves in some cases.
Insults do such damage because, whatever we might say, we want people to like us. An insult, even one given in jest, demonstrates dislike and disapproval. That's probably why insults made by strangers are not as hurtful as those made by people near to us.
In my opinion, getting insulted hurts because insults make us feel insecure. If you think about it, someone cannot insult you by making fun of something you feel secure about. Insults only hurt because we already feel unsure of ourselves in the area that was "hit" by the insult.
For example, if someone is slim and knows it, you can't insult them by calling them fat. They know it's not true and so they're not insecure about it.
But when you say something that could be true, it makes the person feel hurt. For example, let's say there's a smart kid in your class who worries that others may think she's a geek. If you make fun of her for being a geek, it hits right where she is most insecure.
So I think insults hurt us because they hit us in places where we feel vulnerable.