Rubber is made up of long chains of molecules. In the natural state these are unstretched and tangled up.
The stretchiness of elastic materials like rubber imply they obey Hookes Law – Force = Constant x extension or the extension is proportional to the applied force, up to a limit.
When the material is subject to a force which stretches the material, the molecules straighten out in the direction of the force. The material stretches. Rubber has a biological origin. Many biological molecules are made up of long chains. The best examples are crude oil and DNA.
If the force is released, the rubber returns to it's original length.