How do winds form on the earth's surface?
Due to the pressure gradient force.
The atmosphere has mass and therefore weight. The weight of the atmosphere over an area is known as the atmospheric pressure or air pressure. As the atmosphere is fluid there are areas of high pressure and low pressure, caused primarily by changes in temperature and water content (temperature is proportional to pressure given a constant volume, and dry air is heavier than wet).
Once you have a area of high pressure, the natural tendency is for the air in that area to move to an area of lower pressure. The difference between the high and low pressure is the pressure gradient and the force it applies is called the pressure gradient force. This is how wind forms.
There are other forces that determine the direction and speed of the wind but it all starts with a pressure gradient.