both can be used in a situation like you walk into a room with friends "hey guys whats happening/ whats going on?"
whats going on can be used if something is going wrong for example, something is on fire in the office " WHATS GOING ON?!?!" intonation can play a big part in how these phrases sound as well. you can make it condescending, questioning, surprised, angry etc....