an means: “on”, “next to” (LOCATIVE) or it doesn’t have a translation (TEMPORAL)
As a locative preposition, it means “next to”
It is used in contexts like:
Ich bin an der Wand
I’m against the wall
Ich bin am Meer
I’m next by the sea
Ich bin an der Grenze
I’m next at the border
Ich bin am Fluss
I’m next to the river
An forms part of the group of Wechselpräpositionen. This means that the preposition is accusative or dative depending on the clause.
With some institutions such as: die Schule (the school) or die Universität (the university), the preposition “an” is used when we refer to the institution and the preposition “in” when we refer to the building:
Sie arbeiten an der Schule
They work at the shool
Grammar:
An is dative if the prepositional complement of a place does not contain movement (location)
Ich bleibe noch am Bahnhof
I will stay at the train station
An is accusative if the prepositional complement of a place implies movement (direction)
Ich gehe mit dir ans Ende der Welt
I’ll go with you to the end of the world
its translation is "on" or "in". "an" as temporal preposition always takes the dative case.
Am Donnerstag habe ich eine Besprechung
I have a meeting on Thursday
Am Abend habe ich Schach gespielt
In the evening I played chess
Am ersten Mai ist Feiertag
The 1st of May is a holiday
Ich habe am 2. Juni Geburtstag
My birthday is on the 2nd of June
Am letzten Tag meiner Reise habe ich das Meer gesehen
I saw the sea on the last day of my trip
“Nacht” does not use the preposition “an” but rather the preposition “in”
In der Nacht bin ich ein paar Mal aufgewacht
I woke up a couple times during the night
“an” does not change, just like the rest of the prepositions.
am is the contraction of (an + dem)
ans is the contraction of (an + das)