There are/have been several different types of anemometer [a device for measuring wind speed].
The earliest was a flag, or a wind sock, both of which were very poor for determining wind speed, as there was much experience and judgment required to interpret the data of a blowing flag.
The next type of device was a sort of windmill using hemispherical "cups" which the wind spun on an axle, and which drove a very small DC generator which drove a voltmeter on which the dial was marked in wind speed, and calibrated for accuracy.
Currently, to the best of my knowledge, the current best technology is what is called a "hot wire" anemometer.
This one works by passing an electrical current through a wire, which is enough to heat the wire. The amount of electrical current is fed to an Ammeter.
There is a principal of electricity which says that the amount of resistance in a wire is modulated by the temperature of the wire, such that the higher the temperatur of the wire, the greater the resistance of the wire, and therefore the less current that will flow through it.
The converse is also true, in that the cooler the wire, the more current that will flow through it. Therefore, with a very sensitive Ammmeter, and proper calibration, the movement of the needle will be directly related to the wind speed.