Frequency, the only real characteristics of electromagnetic radiation ??
Recall that frequency $f$, wavelength $\lambda$ and the speed $v$ of a wave are all related as follows
$$
    v = f \lambda \, .
$$
So presumably, your book is talking about a situation when an electromagnetic wave crosses boundaries between different media. In such cases frequency indeed remains constant, while the speed of the wave, and consequently, its wavelength change.