Refraction is a test done to determine the lens prescription that will compensate for any refractive error you may have. It has two parts; objective refraction and subjective refraction.
Objective refraction determines the refractive error in your eyes without relying on your feedback to arrive at a result. It can be done using an instrument called retinoscope or a computerized equipment known as autorefractor.
In subjective refraction, your eye doctor requires your feedback to arrive at the best prescription for you. Your doctor does this by first placing lenses equivalent to the result of your objective refraction in a trial frame or phoropter positioned in front of your eyes. The lens power is then adjusted until your preferred prescription is determined.