A current in a coil of wire makes a magnetic field, just like a bar magnet. One end of the coil is a north pole, the other a south pole.
The magnet gets stronger with more turns, more current and a soft iron core. Copper and air cores hardly help.
Reversing the current swaps the poles. Switching off makes the magnetism disappear, so an electromagnet is a magnet you can turn on and off.
Wind 20 and then 40 turns of insulated wire on an iron nail, connect a cell and count how many paper pins each version picks up. Record the results in a table.
This free electromagnet builder simulation is used in these chapters. Open a chapter for its games and quizzes.