According to Hooke's law, within elastic limit for elastic material, material act as a spring, which reforms its shape after we deform it by some external force. Hence, a restoring force occurs
\(\therefore F =- kx \quad k =\) spring constant
\(\therefore F \propto x\)