Quick answer
Voy a Madrid · Estoy en casa · Soy de Irlanda
Three prepositions cover most of what English does with to, in, on, at, from and of.
What each one does
| Preposition | Job |
|---|---|
| a | movement towards, clock time, the personal a |
| en | position inside or on, means of transport, months and years |
| de | origin, possession, material, what something is made of or about |
Motion versus position
Spanish is strict here. A verb of motion takes a, a verb of position takes en. English happily says "I am going in the kitchen".
de for everything English does with of and ’s
There is no apostrophe. Ownership, material and topic all run through de, and de + el becomes del.
Transport and time
Transport takes en, with one fixed exception. Months and years take en; clock times take a.
Memory trick
Is something moving? Then a. Is something sitting still? Then en. Does it come from somewhere or belong to someone? Then de.
Typical mistakes
Voy en Madrid.
Voy a Madrid.
Ir is movement, so it takes a. En would mean you are already there.
El coche de el profesor.
El coche del profesor.
De and el always contract into del in writing and speech.
Llego en Madrid a las dos.
Llego a Madrid a las dos.
Llegar is arrival, a movement verb, so it takes a even though English says "in".
Check yourself
Mañana viajamos ___ Valencia.