The main job of an adult butterfly's life is to reproduce. After a female butterfly mates, she searches for the proper host plant to lay her eggs, and the cycle begins again. Butterflies and moths go through the same stages in their metamorphosis with one difference. Many moths form a cocoon instead of a chrysalis. Once the cocoon is finished, the moth caterpillar molts for the last time, and forms a pupa inside the cocoon.
Some moth species pupate underground instead.
These caterpillars burrow into the soil or leaf litter, molt to form their pupa, and remain underground until the moth emerges. The newly emerged moth will then crawl out from underground, crawl up onto a surface from which they can hang, and will then expand their wings in preparation for flight.