Spiders, like other creatures with exoskeletons, can’t just grow steadily bigger as we do. Instead, they have to moult: they grow a new (but still soft) ‘skin’ under their old one, then burst open the old one to step out of it and wait (preferably somewhere safe) for their new skin to harden.
The cast-off exoskeleton (technically called the exuvia or exuviae) is sometimes eaten – it is valuable protein, after all – by its previous inhabitant or a passing predator. Some insects’ exuviae are typically left untouched, however, and may remain for months; cicadas’ and dragonflies’ exuviae are often seen hanging on a twig or grass stem like this.
My photo here shows an attractive little jumping spider, Cytaea plumbeiventris, on a leaf beside a cast-off skin of the same species. I didn’t see it emerge but my guess is that the skin was its own. (If you click on the photo to see it at full size you may be able to see the green of the leaf through the eye-lenses of the exuviae.)