Longitudinal stability is stability in pitch about the lateral axis. Although the designer is required to build positive stability into the aircraft, it will all fall apart if the pilot allows the centre of gravity to fall outside its limits!
On most aircraft, the centre of gravity is in front of the centre of pressure (lift), which results in a nose-down pitching moment.
To keep the aircraft flying level the tailplane is designed to produce a downwards force, which acts to pitch the nose up.
Imagine an aircraft that has encountered a gust causing it to pitch nose up. As the aircraft has inertia, it will initially continue along its original flight path, and during this time the nose high attitude will lead to an increase in angle of attack of every part of the aircraft – wings, tail, fuselage.
At the higher angle of attack, the aerodynamic forces on some parts of the aircraft will try to pitch the aircraft further and further nose up (destabilising), while others parts will try to pitch the nose down towards the original position (stabilising).
It is the aircraft designers job to make sure the stabilising forces trying to pitch the nose down (back towards the original position) outweigh the destabilising forces trying to pitch the nose up (further away from the initial position). This is positive longitudinal static stability.
This stability of the aircraft depends heavily on the distance between the centre of gravity and the centre of pressure of the tailplane, known as a moment arm. As this distance changes, the strength of the pitching force created by the tailplane changes, which is critical to the aircraft’s stability.
As centre of gravity moves aft (perhaps by taking along a backseat passenger and putting their bag in the rear baggage compartment), this moment arm gets shorter and causes the stabilising force from the tailplane to be weaker. When CG moves forward, the moment arm increases and the longitudinal stability increases.
Stability is said to increase with a forward centre of gravity position and decrease with an aft centre of gravity position.