Most places have a prevailing wind, which is the main direction the wind comes from. In UK the prevailing wind is from the south west, which moving across the Gulf Stream gives us a mild, damp, marine climate.
Winds usually come in a rotating swirl which you can often see in satellite photos. It's a swirling air mass like a hurricane, but usually far less violent, and in a low pressure system north of the Equator the air moves counter-clockwise. Meteorologists call this a cyclone. If you can visualise one of these swirling air masses moving across UK or Malaysia, the leading edge of this rotating air mass might be blowing from south-east toward the north when it first touches land, but soon after, the trailing edge will pass over the same land, and then the wind will blow in the opposite direction. A high pressure system is called an anti-cyclone, and the wind from an anti-cyclone circulates clockwise in the northern hemisphere.
The speed with which it changes direction depends on several things, but mainly the size or diameter of the rotating air mass. There is this tendency for these rotating air masses to drift from west to east. Winds are always strongest where there is low pressure and tend to be much calmer in high pressure.