Light changes its path when it travels through different media due to refraction, which is influenced by the wave nature of light. This phenomenon can be explained by Fermat's principle, stating that light takes the path that minimizes travel time. The refractive index, defined as n=c/v, arises because the electric field of light disturbs atomic charges, causing a delay in wave propagation. The interaction of light with electrons in the medium leads to a resultant wave that has a shorter wavelength and altered speed. Overall, the principles of wave behavior and the geometry of materials are crucial in understanding light's path changes during refraction.