when light hits a transparent surface it either slows down or speeds up this depends on the density of the material. if it sis more dense it slows less dense it speeds up sorta like swimming and running lot easier to run in air than swim in water. if the light hits it head on it doesnt change angle as there is nothing to change its angle but if it hits it at a angle it causes it to curve as the changing of speed at a angle causes it to curve, think of diving into a pool ever notice that you pull slightly upwards when you do that its the same principal. this is called refraction now if you measure the difference in angle going in then when inside this is the materials refractive index. using this sou can figure out at what angle the light will refract back into it self, this is called total internal reflection. by manipulating the materials shape and shooting light into it at the total internal reflection angle you can get it to bounce constantly inside of it. if you make a wire with this in mind you can get it to shoot in one end of the wire and come out the other end.