There are many categories of wind turbine, so it's difficult to be specific without further information. However, all wind turbines employ a mechanism which captures the kinetic energy of the wind and transfers it into rotational mechanical energy (i.e. a rotating drive shaft). The mechanical energy can be employed to perform a mechanical task, such as grinding flour, or to turn an electric generator to produce electricity.
Wind turbines that perform mechanical tasks are also commonly known by the term "windmill". A modern wind turbine will often de designed to maximize the energy harvested from the wind (e.g. by allowing the rotars to swivel and point directly into the wind) and minimize energy loss in the mechanical system (e.g. by utilizing reduction gears to optimize the drive speed on a generator).