Butterflies have four distinct stages in their life cycle. They start as an egg, hatch into a caterpillar, turn into pupae during metamorphosis, and finally emerge as a butterfly.
Cocoon vs. Chrysalis
It's common to call the shell where a butterfly completes its metamorphosis a cocoon, but that's technically incorrect. While some insects, like moths, spin a cocoon, a butterfly uses a chrysalis, which is essentially hardened skin.
Different species of butterflies stay in the chrysalis, or pupal stage, for different periods of time. This can range from about seven days to more than a year, but for a large number of species it is less than 30 days. The well-known monarch butterfly, for example, spends between nine and 14 days in a chrysalis, while the painted lady butterfly spends only seven to 10 days in the chrysalis.