A spring is an object that has been made to take advantage of the elastic way that some materials behave. For example, a piece of steel will return to its shape if is bent a little. So if it is made into a coil (which is a long piece of steel made into a compact shape) it can be used in automobiles to take the shocks out of bumps in the road.
Another material is rubber. This is elastic, and can be used as a block (when it can be used as a shock-absorbing gym mat, for example), or it can be used to pull something tight (when it can be used as an elastic band to hold letters and so on).
So springy materials work both when they are pushed and pulled. But they stand up to being squashed better than pulled, so if they are pulled too much, they will break, as you probably know from using elastic bands.