You can think of a generator as a motor that runs in reverse. Instead of supplying electricity to a stator to make the rotor spin, a generator is mechanically driven to make its rotor spin to supply ...
The NEC requirements specific to generators are in Art. 445. A generator is essentially a motor that is configured to supply power when rotated, rather than rotate when power is supplied to it. Yet ...