Do you already have some knowledge on trigonometry in general? Otherwise we need to teach you sin and cos first because tan is a function that uses both of them.
On atan / atan2 : atan is the normal arcus tangens while atan2 is a version that normally only appears in programming languages. it takes the y and x components seperately instead of the result of y/x