Eye glasses work in the same manner whether they are for nearsightedness or farsightedness. The eye glass lens is curved so that it bends the light rays that hit your eyes so you can see images clearly. Nearsighted individuals cannot clearly see things that are distant. This happens because the light rays come into focus in front of the retina. Farsighted individuals have the opposite problem. The shape of their eyes causes the light rays to come into focus behind the retina, causing things that are near to them to be out of focus. Some people have blurry vision due to an astigmatism, or a condition where the curvature of the eye is irregular, creating a second focal point within the eye. All three of these common problems can be corrected with
glasses.
Source:http://www.glassescrafter.com/information/how-glasses-correct-vision.html