In the linear region of the spring's action, the following equation holds:
F = -kΔx
That means that the force F down on the spring will cause its size to shrink in proportion to the force (and in relation to the "spring constant" k). So if object 2 is twice as heavy as object 1, object 2 will cause twice as big of a Δx shrinkage. The movement down of the scale platform is used to turn the indicator to the corresponding weight of the object. The farther down the spring is compressed, the more the dial moves to show the heavier weight.
More info on springs: