Hello Amelia ,
*It could be used as an informal inquiry, when you ask someone what is wrong:
It is often contracted to "what's up?"
"What's up? Why haven't you left yet?"
It is almost equivalent to "怎 么 了 ?" in Chinese.
* It could be used as an icebreaker as well just like "hi, how are you ?"
So sometimes the one asking it doesn't expect a real answer.
* It could also mean"How is it going? " ,just asking someone about their well being .
So it has various connotations depending on the situation and is mostly used informally in spoken English.