The phrase "What the fuck are you doing" aka "What on fucking earth are you doing" is commonly used by the teenage population. You would use one or BOTH of these phrases if you see someone.. say.... washing their car in 20 degree weather. In this case you would have to make some modifications such as....
"Who the fuck are you?" is typically used in anger-inflicting fashion. It is used to ask a person who they are to say that and what the fuck they are doing in that place, place being physically or electronically. People who say are usually trying to be mean and trying to offend the other person.