One key feature is that an electromagnet has a magnetic field, but only when the electric current is flowing. They're used in situations where regular magnets wouldn't make any sense.