What creates the magnetic field in an electromagnet?

magnetic fields around a straight wire

electric current through a straight piece of metal

electric current through a wire coil

all of these