Fiber optics relies on a phenomenon called Total Internal Reflection (TIR). When light hits the boundary between the core and cladding at a shallow angle, it reflects back inward instead of passing through.
This bouncing effect allows data to travel near the speed of light!