Light travels different speeds in different media depend upon the densities of the substances.When light rays travel from rare medium to denser medium it bends towards the normal.
If the light rays travels from denser to rarer medium it bends away from the normal. Speed of light is maximum in vacuum. It travels with a speed of 3×108 m/s. When it propagates in any medium its velocity is less than 3×108m/s. The ratio of these two velocities is constant. The constant is called “refraction index” (n). Snell’s law is relation between incident angle (i) to the refracted angle (r) i.e. n1sin i = n2sin r.
When light travels from denser medium to rare medium, at a particular incident angle i.e. angle more than the critical angle the total interval reflection takes places. To internal reflection is a phenomenon behind mirage and shining of diamond.