This animated diagram shows monochromatic (single colour) light beams passing through a convex lens whose refractive index changes. At the start of the animation, the refractive index is set at one and the light beams pass through the lens without changing course. As the animation proceeds, so the refractive index increases (indicated by the moving triangle and the increasing blueness of the lens) and the light beams are brought to a focus progressively closer to the lens.
Refractive index is the speed of light in a vacuum divided by the speed of light in the material. In air, light travels at nearly the same speed as it does in empty space and so the refractive index of air is very close to unity (1). Light slows down in water (RI about 1.3) even slower in glass (1.5 and upwards) and much slower in diamond (over 2.4). This animation runs from 1 to just over 2.4 and so the lens material can be considered as changing from empty space to diamond. See also the more visual interpretation of this change in refractive index. The refractive index also varies according to the wavelength (colour) of the light with higher energy (shorter wavelength or bluer) light bending more. This is why white light, which is a mix of different wavelengths (colours) breaks up into a rainbow or spectrum when refracted through a prism.
The speed of light in a vacuum, or c (stands for celeritas, Latin for fast) is a physical constant and is the same for all observers. Its value is defined as 299,792,458 ms-1 (nearly three hundred million metres per second or over 186,000 miles per second).