So the other day this student of mine asked me “should I say in or at the restaurant?”
Well, both options are correct but they mean slightly different things.
First of all, let’s put things into context: imagine that you were supposed to meet a friend for lunch and he or she phoned and asked you “where are you?”
option 1: you answer “I’m in the restaurant”
What you mean is that you’re inside the restaurant (maybe sitting at a table sipping some red wine). If you go for this option, you emphasize the physical space where you are.
option 2: you say “I’m at the restaurant”
This case is less clear in the sense that you could be either inside or around the restaurant. So you could be sitting at a table or you could be waiting for your friend outside, in front of the restaurant.
The following example should help you understand why sometimes speakers choose one option over the other.
Situation 1: “I’m at the supermarket”
Your girlfriend is waiting for you at home, she phones you and says “Where the hell are you? I’m starving!”
In this case the most appropriate answer would be “I’m at the supermarket” because what you mean is that you’re doing the shopping. You don’t want to emphasize exactly where you are as it’s not relevant in this situation. You want to stress what you’re doing. You could have said “I’m doing the shopping” and it would have been a sensible answer.
Situation 2: “I’m in the supermarket”
Now, you were supposed to meet up with your girlfriend in front of the supermarket and do the shopping together (since you both hate doing it). She’s running late and she calls you up and says “Where are you? I’m 10 minutes late”. In this situation, if you were inside the supermarket and you wanted to make it clear to her so that she won’t look for you outside, you would probably say “I’m in the supermarket” (and maybe you would also add “because I was freezing my ass off waiting for you outside” :).
Hope it makes sense!