Here you see the two common types of coil springs. They both use the property that metals can be springy.
You also see a common way that springs are used.....