solenoid
noun
°A coil of wire that acts as a magnet when an electric current flows through it.
°A mechanical switch consisting of such a coil containing a metal core whose movement is controlled by the current.