Most of what happens is below deck. A large hydraulic cylinder with sheaves on both ends starts at full extension. The cable from the deck passes through the sheaves for multiple loops. As the aircraft hooks the cable and pulls it onto the deck, the cylinder is compressed. A control valve that is set for the aircraft's weight is progressively closed as the cylinder is compressed, resulting in the same stopping distance for aircraft of different weights. Image credit: www.nature.com/ figure