“What the hell were you thinking?”
Your 14-year-old son took your car and was driving around the town. He got caught by the police. When you go to pick him up at the police station, you're extremely angry, so you say this.
What the hell were you thinking?
"Hell" is a word that you say when you're angry or surprised. There are lots of different uses and expressions for the word, but the expressions "what the hell", "who the hell", "how the hell", and so on are used when you want to ask a question and show that you're angry or annoyed about it.
As an example, imagine that the tire on your car went flat and you have to replace it. You're trying to fix it but it's not working and you're frustrated and annoyed. Your wife tells you that you need to lift the tire up more, but that's not possible. You say:
How the hell am I supposed to do that?
The word "hell" is considered a "curse word", which is a word that children aren't supposed to say and adults aren't supposed to say in really polite situations. Other curse words include "shit", "ass", "fuck", and "damn". However, "hell" is considered to be one of the lightest curse words. Be a little careful not to use it with someone you don't know very well, but don't be afraid to use it from time to time in your conversations.
Say this when your child, your employee, or someone else who you have authority over makes a stupid or irresponsible decision.
An example of another situation in which you can use "What were you thinking?" is when your husband does the laundry and uses bleach, making all of the clothes white and unwearable. In this situation, you can ask "What were you thinking?"
One reason that people ask this when they're angry is that, in Western culture, when you make a mistake people expect you to explain why you did it. Only saying "sorry" for your mistakes isn't usually enough - you're also expected to explain what you were thinking.