what is the key difference between the windings of the electric motor and electric generator?
Electric motors vary... a lot: size; shape; purpose; AC or DC; linear, rotational, etc.
Electric generators, likewise, vary... a lot.
Having said that, a DC motor can be thought of as a DC generator with the energy conversion process running in reverse: A DC motor converts electrical energy into mechanical energy, and the generator converts mechanical energy into electrical energy. AND the neat thing is that this process can run either direction in the very same device.
Electric cars are doing this now: the electric motor which powers the wheels also acts as an elecrodynamic brake when you want to slow down. The motors use the car's kinetic energy to power each wheel motor as a generator, reclaiming electrical energy to recharge the car's batteries which got the wheels rolling in the first place.
AC motors driven by a mechanical force are a generator the same as a car alt. is. the car alt. like the motor needs to be excited. the motor will put out its rating once at its rated speed and the field excited. The car alt. voltage regulates the field. Then rectifies AC to DC for the car.