It uses optics to measure the length of the patient's eye and how light passes through.
This data in the refraction eye exam is used in prescribing glasses for a patient. It is valuable as a starting point in determining a need for glasses in circumstances when a patient may not be able to provide subjective responses. (EG., a young child or a learning disability).
Because the determination of the need for glasses can not be solely determined optically a doctor must provide the final prescription.