The major role of the lens is to refract and focus light from objects that are both close and far away.  The lens does this by changing its shape. To see at a distance, muscle fibers attached to the lens tighten to flatten the shape of the lens and focus light coming from a distance onto the retina. 

For close vision. These muscle fibers relax and the lens reverts to its naturally rounder shape, which focuses light from close objects onto the retina. This process is called accommodation.

Refractive errors, the most common kind of vision impairment, are caused by deviation in the way light focuses on the retina. More than 186 million Americans use corrective lenses to compensate for refractive errors.

There are four types of refractive errors:

Nearsightedness (myopia): either the eyeball is too long or the cornea has too much curvature

Farsightedness (hyperopia): either the eyeball is too short or the cornea is too flat, and light focuses on a point behind the retina.

Astigmatism: occurs when the cornea or lens is slightly irregular in shape

Presbyopia: occurs when the lens begins to lose its ability to accommodate


Source: The Johns Hopkins White Papers