A swimming pool seems much shallower than it actually is; a spoon appears bent when part of it is in water and a boy’s legs look shorter when immersed in pool. All these effects are due to the refraction of light.
When a ray propagates from one medium to an optically dense medium, the ray refracts towards the normal. Conversely, a ray propagating from one medium to an optically less dense medium is refracted away from the normal.
The speed of light decreases as it propagates in the glass block, causing it to alter the direction of propagation. Since the incident ray and the refracted ray are from the same source, the frequency remains the same. Hence, the wavelength of the ray in the glass is shorter than the ray in the air.