The eye does not move in and out in the sense of the eye socket. The in and out movement is best described in this kids eye health page where it describes a condition called strabismus (emphasis mine).
Strabismus is the term used for eyes that are not straight and do not focus on the same object. Eyes can turn in (toward the nose), out (toward the ear), up, or down if the muscles that move the eyes don't work right or if the eyes are not able to focus properly. Strabismus is also sometimes called crossed eyes (when the eyes turn in) or walleye (when they turn out).
The most common type of strabismus is esotropia, which occurs when either one or both eyes turn in toward the nose, and exotropia is the second most common kind of strabismus, where one or both eyes turn out (Shiley Eye Institute - University College San Diego Heath).