Total internal reflection takes place when a light enters from denser to rarer medium. From snell's law, the light tends to bend away from the normal to the surface. If the difference in optical densities is huge, the light rays tends to refract at more than 90∘ and actually starts reflecting.