As a weather system moves over the land it must follow the topology of the land. You may have noticed, as you move up in elevation, the temperature decreases. This decrease in temperature causes water vapor in the air to condense into rain. Now what happens when you reverse the process? You get a rain shadow.