According to the Cambridge DictionaryCambridge Dictionary, the word motherfucker is a very offensive way to insult someone.
an extremely insulting name for someone you hate or for someone who has made you angry.
But I can hear very often musicians using this term, in lyrics, live shows or interviews, to call their friends or to use it as a mark of respect to someone.
For example, in his song Agains All Odds, Tupac says:
Hopin' my true motherfuckers know
This be the realest shit I ever wrote
This means:
I'm hoping my true friends know
This is the realest words I ever wrote
By the way, we can also note he's using the word shit to qualify his own work, but I guess not in a negative meaning.
So this is an unexpected reverse of meaning. I wonder how it started in music.