Once the swing lock cylinder comes into operation the rear axle is locked to the chassis and this stops it from moving. This has the effect of turning the truck's stability triangle into a rectangle or square. The centre of gravity which may have previously moved outside of the triangle now stays inside the stability rectangle and the forklift truck remains upright.
The second actuator controls the mast tilt and details of how this works are here