Working: The axle is rotated with a machine from outside. When the armature coil of the generator rotates in the magnetic field, electric potential difference is produced in the coil due to electromagnetic induction. This produces a current as shown by the glowing of the bulb or by a galvanometer. The direction of the current depends on the sense of rotation of the coil.
In a DC generator, one brush is always in contact with the arm of the coil moving up while the other brush is in contact with the arm of the coil moving down in the magnetic field. Hence, the flow of the current in the circuit is always in the same direction and the current flows so long as the coil continues to rotate in the magnetic field.