Water falls from cooling air. As the moist air rises, it begins to get cooler. The water begins to fall out as rain. This provides favorable conditions for forest growth. The air continues to rise higher and higher up the mountains.
Rainfall lessens as much of the moisture is left behind.
The highest parts of the mountains probably do not get much water, but there may be some showers or snow. Warm air continues to rise from lower elevations, pushing the high cool air upward. Eventually this air rises above the mountain tops and begins to flow downward. Cold air sinks. As this air flows downward, it warms up somewhat.