What's "what on earth" mean? Is it an idiom?

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. Or kinda like asking, "why is it real/happening?" Ex: What on earth?! Why is there water all over the floor? Ex: What on earth? I've never seen a real reindeer before.