"What's going on?" is an idiomatic expression either used as an informal greeting or as an expression of concern awaiting an explanation.
1.) Informal Greeting: "A: What's going on? B: Nothing much."
2.) An Expression of Concern: "A: What's going on? B: There was an accident!"