A simple electromagnet consisting of a coil of insulated wire wrapped around an iron core. A core of ferromagnetic material like iron serves to increase the magnetic field created. The strength of magnetic field generated is proportional to the amount of current through the winding.