The range of eye problems is vast, and the methods of correction are highly refined and complex, but the basic principle behind the correction of nearsightedness or farsightedness is quite simple.
If you have either of these conditions, the purpose of your glasses is to converge or diverge the light that enters your eyes so that it will focus the image at the right place: on the retina.
The human eye is spherical. Its outer layer, the sclerotic coat, is white except in the front, where light passes through the cornea, whose curved shape bends the light rays in order to focus them.
The middle or choroid coat, containing pigment and blood vessels, forms the iris in front of the eye, with its opening, the pupil. The pupil opens or closes in accordance with the amount of light to which it is exposed, allowing you to see as clearly as possible in the dark while protecting you from intense, direct rays on a hot summer day.
A lens behind the iris, held in place by suspensory ligaments, focuses the incoming light. Contraction of muscles attached to the ligaments causes the lens to bend from a flat to a more spherical shape, which in turn shifts the focus of images. In a normal eye the lens causes the rays of light to converge on the inner coat of the eye, the retina, which contains light sensitive rods and cones.
If you are farsighted, however, the light doesn’t converge enough to bring nearby objects into focus, either because the distance from the pupil to the retina is too short or the lens too flat. A convex lens in your glasses, which causes the light to converge somewhat before it enters the eye, can correct this problem, also helping the eye itself to converge the light more quickly.
Conversely, if you are nearsighted, your eyeball may be too long or your lens too spherical, and as a result the image of a distant object comes into focus before it reaches the retina, falling out of focus again by the time it strikes the retina.
A concave lens in your glasses should diverge the light sufficiently to compensate.