Before discussing wind direction, it is good to first define the term wind. Wind is air movement essentially created by the rising of warm and lowering of cool air. Specifically, as the sun heats the earth the land is heated more quickly than the water. The air above the land gets warmer and rises, creating an area of low pressure. As air continues to rise, it cools and ultimately moves over the water where it falls, creating an area of high pressure, moving cold air toward the land. This movement from one area to the next, resulting from temperature and pressure differences, is what creates the wind.
The direction of the wind is determined by various factors including the friction or lack of friction the earth's surface places on it. As illustrated by Nolan Atkins at Lyndon State College, wind going over a body of water can change direction due to a decrease in the amount of friction it experiences. Very generally speaking, warm air from the equator rises, moves toward the poles, falls and then returns to the equator, according to the BBC weather writers, helping to create wind patterns. Cells of wind patterns are present all over the globe and include "trade winds" which helped Europeans settle in the Americas.
The direction of the wind is measured according to the number of degrees from true north, or 360 degrees on the compass and is described according to the direction it originates from. For instance, an easterly wind means that the wind is coming in from the east, not moving east. Note that wind usually travels horizonally across the earth and is measured on the surface using anenometers and wind vanes and in the upper atmosphere using aircraft reports, among other means, as mentioned by writers at Weather.com.