In motors, generators and similar electric machines, the electrical current that powers them generates magnetic fields that magnetize some of the metallic components.