This is a phrase that you can use to start an argument with someone who's acting angry or rude. "What's your problem?" means "Why are you acting that way?" But asking someone "What's your problem?" makes it sounds like you're criticizing them, so it usually makes people get angrier and start to argue with you.
A: Dude, what's your problem?
B: What's my problem? You're the one who's acting like a jerk!
People usually say "What's your problem?" to family members or people that they're in a close relationship with. But some people would also use this phrase when talking to a stranger who made them angry.
You should not ask "What's your problem?" to ask about someone's health. If someone seems to be sick, ask:
Also ask "What's wrong?" if someone seems sad, frustrated, or frightened.