The answer is refraction.
Refraction of light is the light that passes from one medium to another, coming from the more dense medium going to the lesser dense medium.
The bending of lights usually happens when the light is moves slowly from the medium.