When the coil of a solenoid is charged with an electromagnetic field, the armature iron is pulled toward the stationary iron core. A solenoid is made up of the armature, which is a movable iron core, a coil, a spring, along with a stationary iron core. Solenoids are useful in many home appliances, automobiles, factory machines and other devices requiring an on/off application.
When the electromagnetic current flows through the coil wire, which is wrapped or shaped around the armature iron core, it created a magnetic field around the coil. The strength of this magnetic field is increased with a larger number of turns of the coil. The more turns of the coil will result in a stronger magnetic field. When this happens, the armature iron core is pulled toward the stationary core in order to close the air gap between the two cores.
The purpose of the spring in the solenoid is to allow the armature iron core to retract back to its original position when the solenoid is turned off and the magnetic charge is released. The force of the magnetic pull can be calculated as being approximately proportional to the square of the electromagnetic current and inversely proportional to the square of the distance between the two cores, which is the amount of air gap between the two cores.