I'd never heard of "what the what." OK, I've looked it up and I'll explain it AFTER I explain something else.
There are a number of expressions of the form "What the ____ ?" where various words fill in the blank.
They all express some degree of angry surprise. How angry it is, and how rude the expression is, depends on what word fills in the blank.
1) You call a pizzeria and ask them to deliver a cheese pizza. The doorbell rings. The delivery person hands you a pepperoni pizza. You say "What's this? I ordered cheese, not pepperoni." That isn't particularly polite, but it's not impolite, and it's not bad language.
2) You call a pizzeria and ask them to deliver a cheese pizza. The doorbell rings. The delivery person hands you three pepperoni pizzas. You say "What the heck is THIS?" (Angry). Or "What the hell is THIS?) (Angry and a slightly rude). "I didn't order these. You got the orders mixed up, this is someone else's order."
3) You don't make any phone calls. Unexpectedly, the doorbell rings. Four delivery people from a pizzeria start bringing in six dozen pizzas. You say "What the !!!*&*$!!! is this????? I didn't order these! Take them the !!!*&*$!!! out of here!" (I'm using !!!*&*$!!! to stand for some bad word, possibly the "F-bomb.") You are extremely angry what you are saying is rude.
Now, the explanation. "What the what?" is a catchphrase, a running joke, used by a particular character in a situation comedy: Liz Lemon. Do a Google search on "liz lemon what the what". Don't use it. It isn't in general use. Apparently it is a joke on "bleeping" bad words on television, or substituting weak euphemisms for them.