In an electromagnet what turns the drive shaft that does work?
An electric motor is what turns the drive shaft in an electromagnet. The electric motor uses electricity to create a magnetic field, which then interacts with the magnetic field of the electromagnet to create a force that turns the drive shaft.