Generally, magnetic fields can be produced by electric currents. A wire that has electrical current running though it is surrounded by a small magnetic field. Those fields are so minuscule that we don’t really notice them.
The strength of the magnetic field can be increased by taking the wire and forming it into a coil. The field around the wire becomes more concentrated and is stronger inside the loops of the coil than outside it. By adding more loops to a coil, you create an increasingly strong magnetic field.
The tutorial below shows what happens when a magnetic field forms around a solenoid that is surrounded by iron fillings.