How do fiber optics work?

To understand how fiber optics work, imagine yourself looking through a flexible plastic pipe several miles long, with the inside surface of the pipe coated with a perfect mirror. At the other end, a friend turns on a flashlight and shines it into the pipe. Because the interior of the pipe is a perfect mirror, the flashlight’s beam will reflect off the sides of the pipe (even though the pipe may curve and twist), and you will see it at the other end. If your friend were to turn the flashlight on and off, your friend could communicate with you through the pipe. This is the essence of how a fiber optic cable works.