A dynamo is nothing but an electric motor.
The only thing is we turn the axle to make electricity.
It can be most simply made by taking a cylindrical rod and winding an insulated wire taking it as an axis around a rectangular or circular coil. and joining that coil to a slip ring.
The detailed diagram can be seen from a good book.
These spil rings are then joined to a carbon brush.
A windmill has just a fan which is powered by wind which turns and turns the axle of a dynamo through a system of gears.