An electric generator works on the principle of electromagnetic induction phenomenon. According to it, whenever a coil is rotated between the poles of a magnet, an induced current is set up in the coil, whose direction is given by Fleming's right-hand rule.
When the axle attached to the two rings is rotated such that the arm AB moves up (and the arm CD moves down) in the magnetic field produced by the permanent magnet. The coil ABCD is rotated clockwise in the arrangement. By applying Fleming’s right-hand rule, the induced currents are set up in these arms along the directions AB and CD. Thus an induced current flows in the direction ABCD. If there are larger numbers of turns in the coil, the current generated in each turn adds up to give a large current through the coil. This means that the current in the external circuit flows from B2 to B1. After half a rotation, arm CD starts moving up and AB moving down. As a result, the directions of the induced currents in both the arms change, giving rise to the net induced current in the direction DCBA. The current in the external circuit now flows from B1 to B2. Thus after every half rotation the polarity of the current in the respective arms changes. Such a current, which changes direction after equal intervals of time, is called an alternating current (abbreviated as AC). This device is called an AC generator.