Fiber-optic cables carry information between two places using entirely optical (light-based) technology. Suppose you wanted to send information from your computer to a friend's house down the street using fiber optics. You could hook your computer up to a laser, which would convert electrical information from the computer into a series of light pulses. Then you'd fire the laser down the fiber-optic cable. After traveling down the cable, the light beams would emerge at the other end. Your friend would need a photoelectric cell (light-detecting component) to turn the pulses of light back into electrical information his or her computer could understand. So the whole apparatus would be like a really neat, hi-tech version of the kind of telephone you can make out of two baked-bean cans and a length of string!
Light travels down a fiber-optic cable by bouncing repeatedly off the walls. Each tiny photon (particle of light) bounces down the pipe like a bobsleigh going down an ice run. Now you might expect a beam of light, traveling in a clear glass pipe, simply to leak out of the edges. But if light hits glass at a really shallow angle (less than 42 degrees), it reflects back in again—as though the glass were really a mirror. This phenomenon is called total internal reflection. It's one of the things that keeps light inside the pipe.
The other thing that keeps light in the pipe is the structure of the cable, which is made up of two separate parts. The main part of the cable—in the middle—is called the core and that's the bit the light travels through. Wrapped around the outside of the core is another layer of glass called the cladding. The cladding's job is to keep the light signals inside the core. It can do this because it is made of a different type of glass to the core. (More technically, the cladding has a lower refractive index.)