Refraction of light is the change in direction (bending of light rays) when it goes from one optically transparent medium to another. Refraction is the bending of a wave when it enters a medium where its speed is different. So, it happens because of the adjustment in speed of light on moving between one medium to another.
Bend In Path of Light
Class 12 Student