This type of solenoid is generally called a Linear Solenoid due to the linear directional movement of the plunger. Linear solenoids are available in two basic configurations called a "Pull-type" as it pulls the connected load towards itself when energised, and the "Push-type" that act in the opposite direction pushing it away from itself when energised. Both push and pull types are generally constructed the same with the difference being in the location of the return spring and design of the plunger.
When electrical current flows through a conductor it generates a magnetic field, and the direction of this magnetic field with regards to its North and South Poles is determined by the direction of the current flow within the wire. This coil of wire becomes an "Electromagnet" with its own north and south poles exactly the same as that for a permanent type magnet. The strength of this magnetic field can be increased or decreased by either controlling the amount of current flowing through the coil or by changing the number of turns or loops that the coil has. Electromechanical solenoids consist of an electromagnetically inductive coil, wound around a movable steel or iron slug also called as armature. The coil is shaped such that the armature can be moved in and out of the center, altering the coil's inductance and thereby becoming an electromagnet. The armature is used to provide a mechanical force.The magnetic field inside the solenoid is radially uniform. The magnetic field lines follow the longitudinal path of the solenoid inside, so they must go in the opposite direction outside of the solenoid so that the lines can form a loop. However, the volume outside the solenoid is much greater than the volume inside, so the density of magnetic field lines outside is greatly reduced and sometimes negligible in very large solenoids. The force applied to the armature is proportional to the change in inductance of the coil with respect to the change in position of the armature, and the current flowing through the coil
The inductance in solonoid is a function of the structural makeup of the solenoid, i.e. its cross-sectional area, the number of turns, and its length. Placing an iron-core inside a solenoid will increase the inductance of a solenoid in the same way that placing a dielectric in a capacitor increases its capacitance. In an iron-core solenoid some of the energy in the magnetic field being created is used to magnetize the iron and to increase magnetic energy current supply should be increase which further increases flux which further increases inductance. As we can see that magnetic field in plunger is opposite than that of coil, and hence a inward force will be produced. In this way motion of armature can be analysed. The force applied to the armature will always move the armature in a direction that increases the coil's inductance because the magnetic field that is developed will produce a mechanical force on ferromagnetic materials, i.e. the armature (or solenoid plunger), drawing them to the densest part of the field