Jane is in the supermarket buying groceries for the party. Tom is waiting for his father in the bank. When the speaker is not physically near the building, or, more exactly, when the speaker s location is defined by referring to some other building, even if it is close by, at is used. Tom is waiting for his sister at the bank. When the person spoken about is in a place for its institutional purpose, at normally means that she is inside.
Terry is at the library studying.
Terry is at the grocery store. Special Uses 1. With nouns denoting places of temporary confinement, in instead of at expresses the primary purpose of being in an institution. This is a natural extension of the ordinary spatial meaning of on . In this case, at expresses a secondary purpose.