When a spring is stretched, its extension is the increase in length: extension = stretched length minus original length. In the investigation, a spring hangs from a clamp, masses are added one at a time, and the length is measured with a ruler each time. The force is the weight of the masses added. On Earth a 100 g mass has a weight of about 1 N. The force is the independent variable and the extension is the dependent variable, and you must use the same spring and measure from the same point each time.
For a spring, the extension is directly proportional to the force applied, as long as the spring is not stretched too far. This is called Hooke's law. Doubling the force doubles the extension. For example, if a 2 N force gives an extension of 3 cm, then 4 N gives 6 cm and 6 N gives 9 cm. A graph of force against extension is a straight line through the origin. When the spring is stretched past its limit of proportionality, the line starts to curve.
The same pattern applies when a spring is compressed: the compression is proportional to the force. Other simple systems, such as a steel wire, also behave in this way for small forces.