An electromagnet, in its simplest form, is a wire that has been coiled into one or more loops, known as a solenoid.
A solenoid or coil wrapped around iron or certain other metals can form a(n) electromagnet.