When light travels from one medium into another, direction of motion changes if the index of refraction of the two materials differ. Snell's Law defines how the change of direction relates to the index of refraction of the two materials.
The eye uses refraction to see. Check it out!