Question: when work is done on a spring?
Answer: Work is done when a spring is extended or compressed . Elastic potential energy is stored in the spring. Provided inelastic distortion has not happened, the work done is equal to the elastic potential energy stored.