A windmill is an engine powered by the wind to produce energy, often contained in a large building as in traditional post mills, smock mills and tower mills. The energy windmills produce can be used in many ways, traditionally for grinding grain, pumping water, sawing wood or hammering seeds. Modern wind power machines are used for generating electricity and are more properly called wind turbines.