Refraction
A good and simple way to understand how light works is to think of it like a car. When the car hits the gravel surface (this is the medium) on an angle, the tire that hits it first will slow, causing it to turn in that direction. Therefore, if light hits a medium on the right having a greater refractive index, it will bend right. The amount of bending is given by Snell's law and corpuscular theory of light. Lenses work by refraction.