Hooke's law says that the force produced by a spring is proportional to the displacement (linear amount of stretching or compressing) of that spring:
F = -kx
where k is called the force constant or spring constant of the spring. Each spring has its own force constant.
The diagram defines all of the important dimensions and terms for a coil spring. For each mass hung on it (the mass could be zero), a spring has some natural length, at which it is neither compressed (shortened) or extended (lengthened). At that point, the upward force produced by the spring is exactly balancing the gravitational force on the mass and spring (remember that the spring itself has mass).
We define the coordinate x so that it is negative when the spring is compressed, zero at the natural length and positive when the spring is extended. The minus sign in F = -kx is there by convention; we think of F as the restoring force. When the spring is compressed, a positive force is required to extend it, and when it is extended, a negative force is required to shorten it, or restore it to its natural length.
If the spring is strong or stiff, k will be large, and k will be small for a weak spring.
Hooke's law is applicable not only to coil springs like the one shown here, but also to the bending of metal and some other materials, the stretching of wires like guitar strings, the stretching of rubber bands, and the stretching and compressing of chemical bonds.