An electric generator works on the principle of electromagnetic induction. When a coil is rotated in the presence of a strong magnet, electricity is produced.
See the video below for demonstrating
According to the principle of conservation of momentum, the total momentum of a system of particles remains constant provided no external force acts on it.
Principle of conservation of momentum is one