If you sprinkle iron fillings onto a paper with a magnet underneath, the iron fillings will be attracted by the magnet and move to where the paper and magnet connects.
When electrical current is flowing, what is produced is a magnetic field inside the coil.