It is quite a common view if you stay in Eastern countries that you see mirages under the hot scorching sun while driving on roads, especially during afternoons. You can find yourself to see a small pool of water on the road while there won’t be anything when you approach there. Though it is a bit surprising, there is a simple theory behind it.
Mirages happen when the land is hot and the air is cool. When the land (the asphalt road or a desert land) gets heated up due to hot sun, the air just above it gets warmer. Light travels at different speeds through the hot and cool air. In the regions where the temperature decreases with altitude, the light will travel in a curved path due to refraction. Air has different refractive indexes at different temperatures.
Now, the light that moves from cool air to hot air refracts in U-shaped bent, back into the atmosphere but doesn’t hit anything on the earth. It refracts back causing total internal reflection. But our eyes perceive it to be the light getting reflected from something like water from the Earth’s surface.
Mirage is nothing but an optical illusion that occurs due to the refraction and total internal reflection of light. Mirages could be seen where the land is heated up and the air is cooler, which happens mostly during the summer afternoons. These effects could be found on desert lands, highway roads or open lands.