Most electromagnets are very safe. The strongest ones, however, create hazards from high forces, electric currents and stored energy. These problems are well-known and can be managed with careful design and use.
Some electromagnets are so strong that they pull in any loose metal. Magnetic resonance imaging (MRI) magnets are strong enough to injure or kill from flying metal objects.
The large electric currents used by strong electromagnets generate heat. Some magnets may require water cooling. If the cooling fails, the magnet might become a burn hazard, short itself out or catch fire.
Electromagnets can store a lot of energy in their magnetic field. If the electric current is interrupted or reversed suddenly, the energy will discharge, and can burn or melt switches and wiring.
The strongest electromagnets, used in research, store explosive amounts of energy. They also create large internal and external stresses. These magnets can fail explosively.
Medical Device Interference
The field of a strong electromagnet can interfere with pacemakers and other electronic medical devices. The field can cause the device to fail or wrench it out of its proper place in the body.