This is called Schlieren optics, a cool technique that allows us to see how invisible air moves. Thanks to the difference of density between hot and cold air, light changes speed, bends and creates visual distortions. Exactly the same thing that happens in the mirages but captured in a controlled environment.
This video explains how it works: