The electromagnet in a doorbell attracts the clapper, which hits the bell and makes it ring. An electric motor is a device that uses an electromagnet to change electrical energy to kinetic energy. When current flows through the motor, the electromagnet rotates, causing a shaft to rotate as well.