Wind has both speed and direction. Anemometers measure wind speed and wind vanes measure wind direction.
A typical wind vane has a pointer in front and fins in back. When the wind is blowing, the wind vane points into the wind. For example, in a north wind, the wind vane points northward.
A cup anemometer is a common tool to measure wind speed. The cups catch the wind and produce pressure difference inside and outside the cup. The pressure difference, along with the force of the wind, causes the cups to rotate. Electric switches measure the speed of the rotation, which is proportional to the wind speed.
At wind speeds below about 3 mph, the cup anemometer is prone to error because friction keeps the cups from turning. At wind speeds above 100 mph, cup anemometers often blow away or give unreliable measurements. In freezing rain, the anemometer can literally freeze up and stop turning.
Propellers also can measure wind speed. The propeller blades rotate at a rate proportional to the wind speed.
A windsock often is used at airports. A windsock is a cone-shaped bag with an opening at both ends. When it is limp, winds are light; when it is stretched out, winds are strong. Pilots can quickly determine the wind direction and speed along a runway just by observing the shape and direction of a windsock.
Sonic anemometers use sound waves humans cannot hear to measure wind speed and direction. The instrument determines the wind velocity by measuring the time between when the instrument sends a sonic pulse and when it is received.