A dynamo is an electrical generator that creates direct current using a commutator. It works on the principle of electromagnetic induction, where relative motion between a conductor and a magnetic field induces an electric current. The mechanical energy input is used to rotate the conductor (armature) within the magnetic field.