A mirage occurs because
As hot air rises above cold air descends so as we move upward refractive index also decreases .
For exhausted travelers in the desert, an inferior mirage may appear to be a lake of water in the distance. An inferior mirage is called "inferior" because the mirage is located under the real object. The real object in an inferior mirage is the (blue) sky or any distant (therefore bluish) object in that same direction. The mirage causes the observer to see a bright and bluish patch on the ground in the distance.
Light rays coming from a particular distant object all travel through nearly the same air layers and all are bent over about the same amount. Therefore, rays coming from the top of the object will arrive lower than those from the bottom. The image usually is upside down, enhancing the illusion that the sky image seen in the distance is really a water or oil puddle acting as a mirror.