Eyeglasses bend light before it enters your eye, compensating for eye shape problems. Nearsightedness needs diverging lenses, farsightedness needs converging ones.
The lens curvature determines how much the light bends - stronger prescriptions have more curved lenses.