Oasis is form in desert when there is underground river or water source beneath the surface, the water gets accumulated below the sand because of rocks beneath which water can't percolate. So it becomes naturally fertile for plants. Sometimes migrating bird pass by over it, they stop by for water which can be the reason for natural seed planting I guess, not sure about it.
I am thinking you were asking about this. Other oasis is referred as oasis made by illusion. When walking is plain desert due to heat ,air density becomes less over the surface forming unevenly dense layer of air through out, this causes refraction of light - in short it like this : when sun light reaches the border of hot air layer adjacent to surface , part of it goes straight and part of it gets reflected. When man sees this reflection from far away he would see blue color, because above is clear blue sky, so this reflection can appear like water lake or reservoir, which is just an illusion.