When a light ray is incident from a denser medium Mu1 to rarer medium Mu2 (<Mu1) at angle of incidence i, the angle of refraction is given by :
Sin i / Sin r = Mu2/Mu1
Sin i = ( Mu2 / Mu1 ) Sin r
here r > i as Mu1 > Mu2.
As i increases r increases. At i = i_critical angle, the r becomes 90 deg and the light ray grazes (goes along) the boundary between two media.
For i > i_critical, the light ray is totally reflected in to the medium1.