Radio waves travel at a fixed speed (the speed of light) so the distance between successive peaks of a wave ( its wavelength) varies depending on its frequency. The top picture shows a higher frequency wave than the bottom picture and its wavelength (the distance between the yellow dots on the pictures) is shorter on the higher frequency.
Higher frequency = shorter wavelength
Because the antenna acts as a very weak inductor (it is a piece of wire after all), the length of the antenna can be manufactured to match the wavelength we are interested in.