What does a stator do on an alternator?

The stator on an alternator is used to generate a magnetic field. This is a large factor in the production of electricity.