Both AC and DC electric generators work on the same principle, that is the variation of the total magnetic flux (generated by the stator permanent magnets) through the surface of the rotor coil. In other words, because the rotor coil rotates, it changes the angle that makes with the external magnetic field `B` and the total magnetic flux `Phi =B**S` through its surface changes. Therefore an sinusoidal voltage is induced in the rotor coil (Faraday law).
`V_("ind") =-(d Phi)/dt`
The difference between AC and DC generators arises only from the form of the current collectors that are located at the tip of the rotor (where the ends of the rotor coil wire are connected). While the collector for AC generators is made of two parallel circular rings, the collector for DC generators is made only of a single ring cut in two symmetrical halves. The figure with the two cases is attached below. Thus a simple construction trick converts the AC voltage generated into DC voltage.