When a light reaches a boundary between different materials with different refractive indices, the light will be partially refracted at the boundary surface, and partially reflected.
But, if the angle of incidence is greater (i.e. the direction of propagation is closer to being parallel to the boundary) than the critical angle – the angle of incidence at which light is refracted such that it travels along the boundary – then the wave will not cross the boundary, but will instead be totally refracted back internally. This can only occur when the wave in a medium with a higher refractive index (n1) reaches a boundary with a medium of lower refractive index (n2).
For example, it will occur with light reaching air from glass, but not when reaching glass from air and also the best example is diamond.
The very high refractive index of diamond gives a small critical angle allowing almost all the light entering the diamond to be reflected back for optimized diamond cuts.