The electromagnets are sets of coils put around the stator. These coils compensate for the drop in voltage. Brushes are the one of the most important parts of a generator. In a DC generator brushes make contact with the commutator and they are connected to an outer circuit. So they work as a bridge between the generator and the outer circuit .
Brushes work in pairs across each other.
When a pair of conducting bars of the commutator come in contact the induced current produced passes to the outer circuit. This way , when the conducting bars come in contact with the brushes simultaneously, a pulsing current is produced. DC generators are now replaced by AC generators because of the commutators lack of efficiency. The commutator produced a fluctuating current and created a lot of friction with the brushes which increased the maintenance costs. So AC generators with semiconductor rectifiers to derive the current from AC to DC are used to create direct currents.