Light generally travels at the same speed in a vacuum, which is approximately 299,792,458 meters per second (or about 186,282 miles per second), often denoted as "c." This speed is considered to be the maximum speed at which information or causal influences can travel in the universe according to Einstein's theory of relativity.
However, when light passes through a medium other than a vacuum, such as air, water, glass, or other transparent materials, its speed can be different from the speed of light in a vacuum. The change in speed is due to the interaction between light and the atoms or molecules in the material.
The speed of light in a medium is generally slower than its speed in a vacuum. This slowing down of light in a medium is described by the refractive index of the material. The refractive index is a measure of how much the speed of light decreases when it passes through that particular material.
When light enters a medium, it interacts with the atoms or molecules in the material. These interactions cause the electromagnetic waves that make up light to be absorbed and re-emitted by the atoms or molecules. This absorption and re-emission process leads to a delay in the propagation of the light waves, effectively reducing the speed of light in the medium.
The refractive index of a material is the ratio of the speed of light in a vacuum to the speed of light in that medium. It determines how much the direction of light changes when it enters the medium (resulting in phenomena like refraction) and is also responsible for the bending of light when it passes from one medium to another.
So, while the speed of light in a vacuum is constant, the interaction of light with different materials can cause it to travel at different speeds.