Strain Energy
When we stretch a material up to a point before its elastic limit it returns to its original length. If no plastic deformation has occurred then this energy is recoverable. (we could use it to do useful work later).
The energy stored in a spring or wire ( before its elastic limit) is given by 1/2 F x. From the diagram below you should see that this comes from summing together the work required to to stretch it by very small amounts.

If a wire is stretched beyond its elastic limit then two types of deformation occur, elastic and plastic.

The work done in plastic deformation is not recoverable.
In elastic deformation the atoms in the material have been pulled apart but no bonds have been broken and the atoms return to their original separation when the load is removed.
In plastic deformation bonds have been broken. The internal structure of the material has been changed permanently.
If we load a material beyond its elastic limit then unload it it is permanently deformed.

( note; on a force extension graph the area = work done, on a stress strain graph the area = work done per unit area)