Evaporated moisture from water bodies (such as oceans and large lakes) is carried by the prevailing onshore breezes towards the drier and hotter inland areas.
When encountering elevated landforms, the moist air is driven upslope towards the peak, where it expands, cools, and its moisture condenses and starts to precipitate.
As the air descends the leeward side of the landforms, it is compressed and heated, producing foehn winds that absorb moisture downslope and cast a broad "shadow" of dry climate region behind the mountain crests.
Typically, descending air also gets warmer because of adiabatic compression (as with foehn winds) down the leeward side of the mountain, which increases the amount of moisture that it can absorb and creates an arid region.
When low pressure systems skirt the Rocky Mountains and approach from the south, they can generate high precipitation on the eastern side and little or none on the western slope.