A ray of light, left to its own devices, will travel through the atmosphere in a more or less straight line. If, however, the temperature of the air changes dramatically with height, rays of light are bent or refracted as they pass from one layer of air to another at a very different temperature.
It is because of this phenomenon that we see mirages, most often in this country in the form of an illusory patch of water on a concrete or tarmacadam surface on a hot day.
Any objective (let us say a tree) which is illuminated by the sun transmits rays of light in all directions. It is the rays travelling directly towards us in a straight line, for example, which allow us to see the tree in the normal way.
In very hot weather, however, some of the light proceeding downwards from the tree towards the ground in our general direction may be bent upwards again towards our eyes, as the light is refracted on passing through the very hot air close to the heated ground.
As a result, we may see a second image of the tree upside down and underneath the normal one. This is what is happening on a hot day when a distant tarmacadam surface appears to be covered with pools of water. What we take for water is nothing more than hot air, and what we see is an apparent reflection of the clear blue sky above.
A mirage like this, where a distant object looks as if it is reflected in a "mirror" on the ground, is called an inferior image. A superior image, which is apparently suspended over the object we are looking at, can also occur if the thermal characteristics of the atmosphere are suitable, usually when a temperature inversion exists and the air temperature increases rather than decreases with height, to a depth of several hundred metres.
It is usually this process which leads to the phenomenon we normally think of when the term mirage is mentioned. The alluring image of a fertile not-too-distant oasis has traditionally tantalised thirsty desert travellers.
On very rare occasions when the atmosphere has a specific freakish thermal structure, there can occur a complex combination of superior and inferior images which may cause objects such as boats or buildings to appear as towers of great vertical extent.
This is the fata morgana, a rare and beautiful vision of illusory towers and castles in the air which is said to induce a deep sense of endless longing tinged with happiness, in any one who sees it.