The atmosphere playing tricks on your eyes. Mirages are created when light passes through air layers of different densities. Differing densities are caused by abrupt changes in air temperatures, so the greater the change in temperature the better one can see a mirage.

An example of this is often seen on long, straight roads. The road is heated by the sun and air directly above is warmed by the road. Since air is a poor conductor of heat, layers above the warmed layers are much cooler. So on hot days, the surface of the road in the distance appears wet, but as one advances the watery surface disappears since the road is actually dry. This mirage is the result of blue skylight refracting off the road, through air of different densities, until it reaches the eye of the beholder. This same type of mirage appears in deserts as P_I noded above.

When the air above the ground is warmer with cooler layers above, the refracted light will be inverted making objects appear upside down. In cooler regions, the opposite occurs with cooler air below and warmer air above. This effect causes object in a mirage to appear much higher and closer than they really are. An example of this type of mirage is the Fata Morgana.