This is due to a propertiy of light called refraction
Refraction is a change on the direction of the light when pass from a medium to another one.
Whem vapours move out of kettle ,the air just below is hotter. but as vapour moves up.its spread out and air is not as hotter as air just above kettle.
Thus there is difference in density of air (chamge in temperature spread air ,increase volum and density change)
You know light travel through straight line
So when light moves through this air of different density,it chamges its pth from straight line ,thus this changes in path of light creates a flickering of
Images when we look through the vapour
You will study more about refraction of light in upper classes