The same way it is generated on an onshore wind farm. Wind is used to generate electricity using the kinetic energy produced by moving air. This is converted into electricity using wind turbines or wind energy conversion systems. The wind first strikes the blades of the turbine, causing them to rotate and the turbine connected to them to rotate. This converts the kinetic energy into rotational energy, moving the shaft connected to the generator and thus generating electricity through electromagnetism. Source: irena.org/wind