Hello
"what the hell?" ," who the hell?" , "like hell" or simply "hell".
They express intensified emotions whether anger or surprise when saying anything or they just intensify what is being said .It is a slang and not necessarily a curse. It is just not appropriate to use it formally or with people you should show respect like elder people etc. ,while acceptable among peers and friends.
It could also mean "it is not important" or "who cares " as in :
"It costs a lot more, but what the hell ,we can afford it".
It is not a sign of courtesy to use it though, however it is often used nowadays where those exclamations and modes of expressions became widely accepted and are not regarded outlandish anymore.
So was wie "zum Donnerwetter noch einmal " auf Deutsch. Man kann nicht sagen es sei ein Schimpfwort ,aber nicht ganz anständig ,wenn du weißt was ich meine ;)