When you compress a spring, it possess potential energy. The force of compression is proportional to the compression, according to Hooke's Law. Releasing the spring turns the potential energy into kinetic energy. The spring can be then used to propel some object.