Like some other planets in the solar system, the earth is surrounded by a layer of gases. Earth's atmosphere consists mainly of nitrogen and oxygen.
Individual gas molecules are constantly moving at different speeds in different directions. Together, they are firmly attached to the Earth, by the force of its gravity.
What is the wind?
Wind is a joint movement in one direction of large masses of molecules of atmospheric gases. A stream of such molecules moving synchronously can whistle, blowing around a tall building, and tear off hats from passers-by, but if the molecules are a whole river, and even a few kilometers wide, then such a wind can fly around the entire planet.
Indoors, where the air barely moves, you can even forget about its existence. But if you put your hand out the window of a moving car, it becomes clear that the air exists, and although it is invisible, it exerts tangible pressure. Indeed, we constantly experience the pressure of the air, which seems ephemeral and weightless. But in fact, the entire atmosphere of the Earth weighs no less than 5 quadrillion tons.
Interesting fact: the wind blows because air pressure is different in different parts of the atmosphere.
How does the wind come about?
Winds happen because the atmospheric pressure in different parts of the atmosphere is slightly different. Why does the pressure difference cause the wind? Imagine a dam.The height of the water level on one side is 6 meters, on the other - 3. If you open the floodgates of the dam, the water will quickly flow to the side where the water level is 3 meters, and will flow until the water levels are equal. Something similar happens with air.
The pressure in different parts of the atmosphere is different, because these areas have different temperatures. In warm air, molecules move faster and tend to scatter in different directions, so warm air is more rarefied, its weight decreases, and the pressure created by it decreases. In cold air, molecules gather in closer clusters, the weight of such air is greater, and hence the pressure is higher than that of warm air.
Like water, air tends to flow from a high-pressure region to a low-pressure region to fill the void of more rarefied air. This process causes the occurrence of wind. This is how the wind forms off the coast. It's a nice sunny day. The sun's rays warm the shore and water of the ocean. But the water heats up much more slowly than the shore, because the surface warm layers of water immediately mix with the colder, deeper layers. As a result, the air over the coast has a higher temperature than the air over the ocean.
The air above the shore expands, becomes more rarefied, its pressure decreases. Warm air, expanding, rises to the top, where it cools, its volume decreases, but the pressure rises. High above the ground an area of high pressure is formed.At altitude, a mass of cold air begins to move toward the sea. At the same time, the air above the sea, which has a higher pressure than the air at the surface of the earth, begins to move towards the shore, carrying with it a cool. At the same time, people resting on the beach feel a breath of freshly born fresh wind.