A cocoon is a casing spun of silk by many moth caterpillars, and numerous other holometabolous insect larvae as a protective covering for the pupa. (source)