Accommodation
The distance between the retina (the detector) and the cornea (the refractor) is fixed in the human eyeball. The eye must be able to alter the focal length of the lens in order to accurately focus images of both nearby and far away objects on the retinal surface. This is achieved by small muscles that alter the shape of the lens. The distance of objects of interest to an observer varies from infinity to next to nothing but the image distance remains constant.
The ability of the eye to adjust its focal length is known as accommodation. The eye accommodates by assuming a lens shape that has a shorter focal length for nearby objects in which case the ciliary muscles squeeze the lens into a more convex shape. For distant objects, the ciliary muscles relax, and the lens adopts a flatter form with a longer focal length.