it can be both; depending on the situation at hand.
explanation:
let's just say i get in to a confrontation with someone, and they say "ur mom", it could be seen as an insult. or depending on the relationship or comfortability with the person it may be seen as a joke. the distinct line is how the chemistry behind the confrontation.