Astigmatism occurs when the eye is unable to focus the image of an object correctly onto the retina in the back of your eye. This is caused by either damage (ie scratch) to the cornea (the surface of your eye) or an incorrectly functional lens (which is found at the front of your eye). The lens is controlled by a set of muscles called the ciliary muscles and they control the shape of the lens to focus the light into the back of your eye.
Astigmatism occurs because your eye has to focus an object both horizontally and vertically so that it hits the sweet spot in the retina to allow you to see a sharp image. If either of these two criteria are not met then an object will become blurry.
Fortunately the problem can be managed by identifying the type of astigmatism you have and then being prescribed glasses, contact lenses or surgery to fix the problem.