When a beam of light waves hits a transparent material such as glass the speed of the waves slows down.
If the waves meet the interface at an angle the beam bends - this bending is called refraction.
The speed of light in air is 3x108 ms-1 (ca) and its speed in glass is about 2x108 ms-1 (cg).
In the animation the angle of incidence of the waves in air is 40o, the refractive index of the glass (ca/cg) = 1.5 and this gives an angle of refraction of the wave in glass of 25.4o.