Light rays going through the human cornea (the front surface of the eye) must be precisely projected on the retina in order for sharp images to be created of distant objects.
If the image is blurred, light rays may be directed at the right spot with glasses or contact lenses.
Instead of glasses or contact lenses, the refraction of the cornea itself can be changed with the help of a laser beam. This is like putting a permanent, invisible contact lens on the eye.
So the laser can be used to very precisely change the refraction of the cornea in the intended direction, curing either shortsightedness (myopia) or farsightedness (hypermetropia) or astigmatism.
Light rays are projected onto the retina in the laser-treated eye just like in a healthy, untreated eye. The laser beam is controlled by a computer, entirely independently of human influence.
The correction surgery is painless, takes no more than 5-10 minutes, and requires no special cooperation on the part of the patient.