Let’s refresh several physical effects for the atmosphere parameters. When we climb atmospheric pressure will decrease, during descending pressure will increase. What’s going on with the temperature? If pressure increased the temperature will raise even we will not heat it (so called adiabatic compression and expansion). Examples from our daily life are compressor heating and natural gas cooling while its pressure reduced for usage in a gas stove. Let’s combine both effects in a one sentence: temperature drops during altitude increase and raise during altitude decrease.
Generally, temperature decrease for 1 degree centigrade for each 100 meters of altitude.
And now let's imagine that a strong wind is blowing up the mountain and this Mount is Elbrus (the highest European mountain)
Let's see at the air mass at an altitude of 3500m near the mountain - its temperature is -3 degrees.
Thousands of tons of that air are lifted by a strong wind to the top of Elbrus (5642 meters), where the temperature is -18 degrees. In accordance with the adiabatic law, the temperature of the raised air will drop by 1 degree every 100 meters, which means that the temperature of the raised air will drop by 21 degrees and become -24 on the top!
The mass of air with temperature -24 degrees on the top of the mountain, while the air around is -18!
The raised air is 6 degrees colder, which means it is heavier than the surrounding air, and thousands of tons of air passing over the top rush down the mountain! As it descends, the air heats up by 1 degree every 100 meters.
Air mass inertia doesn’t allow the flow to stop at equilibrium point (point with the same temperature as the flow) and air goes even lower. It quickly skips the height from which it was raised and drops below ... at an altitude of 2500 meters beyond Elbrus, our mass will already heat up to +7 degrees, while the surrounding air at this height is +1.
And the warm air rises up! Moreover, the difference is more than 4-5 degrees with the surrounding air makes the air "shoot" upwards at a speed of up to +15 meters per second! Thus, a "wave" is formed.
After this wave, the air will begin to sink and the situation will repeat itself.
There is the main "Master wave" - the highest, and behind it there are several "secondary" ones that gradually fade away (like ripples on the water from a thrown stone).
It should be noted that a wave requires a wind at the level of a mountain or ridge above 10 m / s and stable stratification in the lower layers of the troposphere (when the air temperature does not change much or does not change at all with altitude, such conditions usually appear in late autumn and winter.)