Why wind blows? Why it's directions gets changed time to time?
Answers
In its simplest form, winds change direction because high-pressure systems and low-pressure systems move around, and winds blow from high-pressure systems to low-pressure systems.
Adjacent high- and low-pressure systems represent, effectively, potential energy, with the high-pressure area equivalent to a cliff. The greater the difference in pressure between the systems, the greater the potential energy, just as potential energy increases with the height of the cliff.
Step off a low cliff and you'll hit the ground more slowly than if you step off a high cliff, barring terminal velocity and base jumping rigs. Similarly, winds between a very high-pressure area and an adjacent very low-pressure area will be much stronger than winds between areas where the pressure is more equal.
The difference is that high-pressure systems, the cliffs, change their location regularly over time, and both come into being and disappear entirely, and the same is true for low-pressure systems.
The rotation of the earth creates predictable winds as well, with large clockwise wind patterns in the northern hemisphere and counterclockwise wind patterns in the southern hemisphere. These bands of winds tend to greater stability and often lead to prevailing winds, that is to say winds which will be the dominant direction and speed for a certain area barring other major causes of winds.
One of the other major causes of winds of different speed and direction are cyclonic storm patterns, which are somewhat self-perpetuating vortices in the atmosphere which have a very low-pressure system in the middle and a rotating band of winds on the outside. As air gets sucked into the low-pressure system, it gets converted into the vortex winds. These storms -- hurricanes, typhoons and the like -- have measurable wind velocities at different areas and depending on which area of the cyclonic system is expected to be over your shingled roof, they can predict with some accuracy the range of winds and direction you are likely to experience.
Storm lines are another regularly occurring meteorological feature, with storm fronts moving downwind effectively as a line of storms, followed by a row of calmer air, followed by a line of storms. These are typically cumulonimbus in nature, and move at a fairly predictable speed. The cumulonimbus clouds are enormous updrafts, effectively creating very low pressure areas underneath them which draw winds in from either side, while still being pushed downwind by the prevailing winds. These create significantly higher gusts of a relatively predictable nature, and the prevailing winds allow statements of the base expected winds. Over the course of a couple of hours, two storm fronts might pass with winds generally tracking the direction of the storm fronts' travel, but with locally experienced winds being in completely the opposite direction at ground level, and radically different directions as you gain elevation.
Another feature which creates predictable changes in wind velocity and direction is bodies of land near bodies of water. As the sun heats the land, warm masses of air near the ground are created. Warm air, all else being equal, is lower density than cold air, so it tends to rise as thermals. The rising is propelled by cooler air being drawn in from the water, which is much more resistant to being heated by the sun. That's why there are frequently onshore winds in the afternoon in many parts of the world, enjoyed by wind sports enthusiasts including paragliders, kite surfers and windsurfers.
The same mechanism occurs up river valleys connected to the sea. The sun on the inland part of the valley warms air causing it to become lower pressure and to rise, drawing cool ocean air up the valley. The valley frequently narrows as it travels inland, or features major bluffs which the wind is wrapped around; both of these elements tend to increase the velocity of the wind.
Not finally, but my last predictive example, are the reverse winds of the previous two examples. As the sun sets, the land cools sharply and the air above it cools as well. Meanwhile, the water bodies remain relatively the same temperature. Often, this results in air becoming higher pressure above land than above water, and evening winds blow out to sea.
There are many more microclimatic and interesting atmospheric conditions which create interesting wind conditions of specific types, but these are the major ones.
.
.
As a result of the slowing down of the air as it moves over the ground, wind speeds are less than would be expected from the pressure gradient on the weather map and the direction is changed so that the wind blows across the isobars into a center of low pressure and out of a center of high pressure.
.
.
HOPE THIS HELPS YOU