"My bad" is a slang phrase that some people use as a light apology. It's like "Sorry!" but more casual.
When you make a really big mistake, don't say "My bad." Say "I'm sorry" or "I apologize."
"My bad" is mostly used by young men in their teens, 20s and 30s.