A mirage is formed by a perfect collection of several factors. First, there has to be a layer of very warm air near the ground (like you would find in a desert). This warm air refracts the light from the sky into a U shpaed bend (parabolic). Our minds interpret that light being refracted as having come from the ground, when in fact it is coming from above. What we are really seeing is the sky being refracted onto the ground and we interpret that as 'water'.