Windmills and wind turbines both harness wind energy and put it to practical use. The difference is in how they do it: One is a machine with mechanics powered by the wind, the other generates electricity for use elsewhere.
Windmills convert wind energy directly into mechanical energy for such tasks as milling grain--the source of the term--or pumping water, which is usually the purpose of windmills you see on farms.
The spinning vanes of a windmill turn a camshaft, which is connected by gears and rods to the machinery that does the work. All power is directed into the work
A wind turbine converts wind energy into electricity, which can then be used to power electrical equipment, stored in batteries or transmitted over power lines.
Wind Turbine Mechanism
A wind turbine has essentially the same parts as a simple electric motor, but it works in reverse: A motor uses electrical current to produce motion; a wind turbine uses motion to create electrical current.
Though "windmill" is frequently used by laypeople to describe electricity-generating wind turbines, the wind power industry and windmill manufacturers both make a careful distinction between the terms.