Hooke's law states that the amount a spring is stretched is directly proportional to the force applied (until the elastic limit is reached).
Imagine you have completed an experiment to demonstrate Hooke's law. You know from the theory to expect a linear relationship between the weight applied to the spring and the amount the spring stretches (as long as you don't go past the elastic limit). Now you want to see if your experimental data had the same result.
First you must plot the data on a chart, then you apply a linear trendline to see if you do have a straight line.