to get a better life and have children that they get to see grow up better than they did.
it can be both; depending on the situation at hand.
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.