Solenoid

An electrical conductor wound in the form of a helix with a straight axis. When carrying an electric current it acts as a bar magnet.