If you have ever been under water in a swimming pool with your head close to the surface, you have probably noticed that the water-air interface becomes a mirror and you cannot see outside. That is an example of TIR. Basically, whenever you have an interface of two materials (mediums) of different indexes of refraction or optical density, a light beam will fully reflect at this interface if it is trying to escape the denser material at an angle that is larger than a certain critical value.
All optical fibers are basically cylindrical wires made of glass. They have a core (the optically denser medium) and a so-called cladding, which is optically less dense. The cladding fully surrounds the core, like a cylindrical jacket. The light signal is inserted into the core and it travels down the core with occasional TIR reflections from the core-cladding interface. It is almost as if you have a tiny cylindrical mirror from which the light reflects. These total internal reflections are so efficient that the light signal does not lose much of its strength at each reflection as it would when reflecting from an ordinary silver mirror. Thanks to TIR, signals can travel as far as 250 miles (400 km) without needing amplification.