Theory:

Light is refracted away from the normal when it travels from a denser medium into a rarer medium. The angle of refraction increases in lockstep with the angle of incidence in the denser medium, eventually reaching a maximum of r=90° for a given value. This angle of incidence is called the critical angle.
 
Screenshot 2021-07-30 100928.png
Refraction of light from denser to rarer medium
  
Critical angle:
 
The angle of incidence at which the angle of refraction is 90°, is called the critical angle.

At this angle, the refracted ray grazes the surface of separation between the two media.
Screenshot 2021-07-30 100957.png
Critical angle
 
The refraction is not possible when the angle of incidence exceeds the critical angle value. The ray is completely reflected back to the same medium because \(r\) \(>\) 90°. This is called total internal reflection.
 
Screenshot 2021-07-30 101010.png
Total internal reflection
  
Conditions to achieve total internal reflection:

In order to achieve total internal reflection, the following conditions must be met.
  • The light must travel from a denser medium to a rarer medium. (Example: From water to air).
  • The angle of incidence in the denser medium must be greater than that of the critical angle.