Deserts are formed through these three main causes.
Most of the world deserts are made by the equatorial wind belts. At the equator warm air is always rising. This created wind belts that blow north and south away from the equator. When air descends at the tropics of Cancer and Capricorn it is too dry for clouds to form. No clouds means no rain, producing deserts. An example of this is the Sahara desert.
Rainshadow also produce deserts. A rainshadow is a dry area on the lee back side of a mountainous area. Any moisture in the air will fall as air passes high mountain ranges, so land beyond the mountains receives little or no rain. The Gobi desert is produced by rainshadow.
Cold currents also produce deserts, specifically coastal deserts. The southwestern coasts of Africa and South America are swept by cold currents upwelling from the ocean floor. These currents cool the air that passes over them, causing the water in the air to fall as rain before it reaches the land. The Namib and Atacama deserts have formed because of these cold currents.
Source: St. Marys Media & Wikipedia