Solenoids operate on the principle of electromagnetism. With current moving through a conductor, a magnetic field forms around the conductor. A single straight conductor by itself will not generate a strong magnetic field, but if the conductor is wound into a tight coil, it will produce a strong magnetic field. Each loop of the coil will create a small magnetic field, and every loop combines to create a larger magnetic field. The more wound loops, the larger the magnetic field produced.
Adding an iron bar inside the coil of wire will create a solenoid. When the circuit is complete with the switch closed, the magnetic field generated will pull the iron bar to the center of the coil. This form of electromagnetism is used with relays and gas valves.
With a closed circuit, current flows through each loop of the wound coil. Each wound loop creates a small individual magnetic field, which when totaled together loop adds up to a much larger magnetic field.
The armature is pulled into the middle of the coil with the generated magnetic field moving the seat up.
Once the circuit is open, and no current is flowing, the armature is released back to its resting position.