Often used as an insult. I'll make examples of both but your mom is often used as an insult or compliment about someones mom. Or just straight up making fun of you and/or mom.
Good use:
Friend: Hey man! Your mom is pretty cool!
Person: Thanks, she is the best!
Bad use:
Bully: Dude, I f##ked your mom
Example #2
Bully #2: Your mom is gay!