the blades or sails of the windmill are turned by the wind. gears and cogs makes the drive shaft inside the windmill turn. in a windmill used for making flour, this turns the grinding stones. as the stones turn, they crush the wheat (or other grain) between them. in a windmill used for pumping water, turning the drive shaft moves a piston. the piston can suck up and push out water as it moves up and down. in a windmill used for generating power, the drive shaft is connected to many gears. this increases the speed and is used to turn a generator to make electricity.