往 + [direction] + [verb]
往 + [place] + [verb]
[verb] + 往 + [place]
往 + a direction goes before a verb of movement and says which way the movement goes. It's the everyday word for giving directions.
往 also takes a place, or 这边 and 那边.
English puts the direction after the verb: "turn left", "go back". 往 + direction comes first.
A few verbs take 往 after them, followed by a destination: 开往, 飞往, 寄往. They turn up on trains, at airports and in announcements.
往 gives direction and nothing else. Aiming an action at a person – smiling at them, learning from them – takes 向 or 对.