Rain clouds travel across the sky. Rain clouds are stopped or slowed by mountains or wind. The rain clouds drop the rain. The clouds are no longer raining when or if they reach the other side of the obstacle. On the other side of the mountains or rain, there isn't much rain. The area that receives little rain develops a very different ecosystem. The area that receives little rain becomes a desert. 
How are deserts formed?