Optical fibers transmit light between two ends and are used widely in fiber-optic communications. They consist of a core and cladding, with the core having a higher refractive index to keep light within the core through total internal reflection. Optical fibers have advantages over metal wires like lower signal loss, higher bandwidth, and immunity to electromagnetic interference. They are used for long-distance, high-bandwidth data transmission and for applications like imaging in confined spaces.