When we express time before something else we can say prima che or prima di, which both mean before.
Examples:
Prima di andare a casa, ho chiamato Marco.
Prima che andassi a casa, ho chiamato Marco.
Before going home, I called Marco.
When we talk about what happened at the same time as something else we can say nel momento in cui ( the moment in which), quando (when) or mentre (while).
Examples:
Mentre parlavo al telefono, hanno suonato alla porta.
While I was talking on the phone, the doorbell rang.
Nel momento in cui l'ho vista, ho capito che era una persona in gamba.
The moment I saw her, I knew she was smart.
Quando sono arrivati era già tardi.
When they arrived, it was already late.
When we express time after something else we can say dopo or dopo che which both mean after.
Example:
Dopo aver mangiato, non si può fare il bagno in piscina.
After eating, you can't swim in the pool.