Final answer:
When a spring is compressed, it gains potential energy which can be converted into other forms of energy when the spring is released.
Step-by-step explanation:
When a spring is compressed, it gains potential energy due to the work done on it. This potential energy is stored in the spring and can be converted into other forms of energy when the spring is released.
For example, in the case of a door, when the spring is compressed, it stores potential energy. When the door is opened, this potential energy is converted into kinetic energy of the door as it moves, and then into gravitational potential energy as the door reaches a higher position.
Overall, the compressed spring gains potential energy, which can be transferred and transformed into other forms of energy when the spring is released.