To make an electromagnet, all you need is current through a wire. Seriously, that's it. It will be a terribly weak magnet though. To ramp up magnetic field lines from wires, we tend to wrap them in coils. These coils will result in a bunch of magnetic fields that agree with each other, resulting in a stronger total magnetic field. Stronger electromagnets are made out of tons of weak electromagnets, in a similar way as permanent magnets.