the answer is "they have different wavelengths"
i don understand.
what you have learned is speed of all electromagnetic waves is a
constant
so the thing that varies is either frequency or wavelengths
since v = fλ is a constant
Example, gamma rays have higher frequencies (and thus shorter
wavelengths) than visible light.
Radio waves have lower frequencies (and thus longer wavelengths)
than X-rays