For any wave, the product of
(frequency) x (wavelength)
is constant ... it's the wave's speed.
So you can see that if either the frequency or the wavelength changes, the other one must change in the opposite direction, to keep their product constant.
Shorter wavelength <==> higher frequency.
Longer wavelength <==> lower frequency.