Astigmatism, nearsightedness (myopia) and farsightedness (hyperopia) are all types of refractive errors. Refractive errors happen when light rays can’t hit the retina properly due to the shape of the cornea, the lens or the eye in general.
With nearsightedness, the curvatures are symmetrical but are too round, or the whole eye is too long from front to back. This causes light entering the eye to be refracted to a focal point in front of the retina, rather than on the retina.
Farsightedness is the opposite — the curvatures are symmetrical but not quite round enough, or the eye is too short from front to back. Light rays that enter the eye end up at a focal point somewhere behind the retina.
With astigmatism, the curvatures are asymmetrical. They are shaped like the side of an American football rather than round like a baseball. This creates multiple focal points of light within the eye, rather than just one. Astigmatism usually occurs along with myopia or hyperopia.