Butterfly and Moth Life Cycle
Butterflies and moths begin life in eggs attached to the leaves of a host plant, usually of the variety that the caterpillar eats as food. The insects hatch into caterpillars with a striped or patch-work design skin that is shed several times as it grows. Caterpillars go through the metamorphosis phase as a pupa inside their chrysalis or cocoon. During this phase, their entire physical structure is completely rearranged, before they finally break out of the cocoon to emerge as an imago --- a moth or butterfly.
Pupa, Chrysalis and Cocoon defined
Pupa is defined as an intermediate, metamorphic stage of life where an insect, enclosed in a protective covering, changes from a larvae (in this case a caterpillar) into the adult imago stage, typically as winged insects. Chrysalis' and cocoons are the coverings for moths and butterflies in their pupa state.
Butterly Chrysalis
The butterfly cocoon is called a chrysalis, from the Greek word for gold. The chrysalis, like the moth's cocoon, is produced by two glands to form a glue-like, fibrous substance, that is spun around the caterpillar's body, and then hardens in the air. The chrysalis has no silk covering and becomes hard and smooth. The chrysalis for many butterfly species (e.g. the monarch) becomes transparent about 24 hours or so before the butterfly emerges, approximately 10 to 14 days after entering this protective casing.
Moth Cocoon
Moth cocoons are made from the same two glands as the butterfly chrysalis. However, they are typically covered in silk, and are soft rather than hard. Some moth larvae (caterpillars) spin their cocoons in trees. Some, however, burrow into the ground, going through the pupal phase while buried underground, so they are protected by the dirt instead of a silky cocoon. The underground moths will emerge from underground and climb to a high spot (i.e. a tree) and spread its wings to dry and exercise their flying muscles, like those that emerge from cocoons.