Coil springs are mechanical devices. In essence, they consist of a helix made from a material such as steel (or a durable plastic). Although the material itself is rigid, the helical shape makes the spring elastic. Coil springs can be compressed or extended.
Coil springs store mechanical energy when compressed or extended, and release it when the applied force is removed.
By Hooke's Law, for moderate compressions/extensions the force exerted by a coil spring is directly proportional to its displacement from its equilibrium position. This property allows forces to be measured by observing their effect on a coil spring. For example, a mechanical scale contains coil springs.
Coil springs can also be used, for example, to absorb shocks or for a "pop-up" effect as in retractable pens or foldable cylindrical bags.