How Do Magnets Generate Electricity