How does your eye change to focus on nearby or far away things?!
Tiny but powerful muscles change the thickness of the lens to cast an optimal image on the retina. When we look at something close up, these muscles contract to make the lens thinner front to back and thus produce a longer focal length. When focusing on something far away, the muscles relax so the elastic lens becomes thicker, shortening its focal length. Thus an excess of lose work or reading can overtax the muscle cells to produce eyestrain, and as we age the lens tends to become less and less elastic so that we experience more difficulty focus sing on things close up.
Hope this helps. For additional information search nearsightedness, farsightedness, and astigmatism.
A muscle draws the lens of your eye our closer or nearer. Your eye's lens actually changes shape a little and works much like a camera lens!