This known as a mirage.
Very simply the hot air rising from the desert surface causes light (which travels in straight lines) to be defracted (this means that the line of travel changes when moving from cold air to hot air and vice versa) This leads to two effects.
First is a shimmering on the ground in the middle distance which resembles sunlight glistening in water.
Secondly, objects that are in the far distance can be seen to be closer than they are.
These effects can be observed on road surfaces in the right conditions during hot summer weather.