The optical fibers are the optical devices which is based on the total internal reflection.
The optical fiber has two layers, one is called core and the other is called cladding.
The refractive index of core is more than the cladding.
As a ray of light falls on the core at more than the critical angle for that pair of media(core and cladding), it suffers the total internal reflection at the interface.