What's "what on earth" mean?

Native speaker’s answer
Rebecca
"What on earth" is an exclamation and is used for emphasis. It expresses surprise, shock, anger, disgust, and so on! It's kinda like saying, it's so surprising that it shouldn't be on earth. Ex: What on earth?! Why is there water all over the floor? Ex: The answer for the test doesn't make sense. What on earth? => confusion