Light travels at $c = 3.00 \times 10^{8}\ \text{m/s}$ in empty space, and slower in glass, water or plastic. In Refraction and Lenses you saw that this change of speed is why light bends. The ratio that measures the slowdown is the index of refraction. It ties to v = fλ, so a change in speed must change something else as well.
🔑 Key idea
$$n = \frac{c}{v}, \qquad v = \frac{c}{n}, \qquad \lambda_{n} = \frac{\lambda}{n}.$$ In a material light is slower and its wavelength is shorter by the factor $n$, but its frequency stays the same.
Light in a material is never faster than $c$, so $n \ge 1$. Air is so close to 1 that we use $n = 1.00$.
Material
$n$ (yellow light)
air
1.0003 (use 1.00)
water
1.33
crown glass
1.52
diamond
2.42
💡 Why it works
Why can't the frequency change? Picture crests reaching the surface of the glass. Each crest that arrives becomes a crest inside. If 500 trillion crests arrive per second but fewer left the surface each second, they would pile up there, and if more left, they would come from nowhere. So crests leave at the same rate they arrive. The frequency is fixed by the source; only the speed and the spacing change.
Wavefronts crowd together in glass: the wavelength shrinks by $n$ while the crests keep arriving at the same rate.
⚠️ Common mistake
Thinking the frequency, and so the color, changes when light enters glass. A red laser beam is still red inside water. Color is set by frequency, and the frequency never changes at a boundary. Check: in $v = f\lambda$, if $v$ drops by $n$, it is $\lambda$ that drops by $n$.
✏️ Worked example: Light in diamond
How fast does light travel in diamond, $n = 2.42$?