A chrysalis is the form a caterpillar takes before it emerges from its cocoon as a fully formed moth or butterfly. The chrysalis has hard skin that's left behind after the caterpillar sheds its soft outer skin.
Besides forming itself into a chrysalis, a caterpillar is also able to spin a kind of sticky silk for attaching itself to a branch or leaf. The often gold-colored chrysalis stays attached while undergoing further transformation toward becoming a butterfly. Chrysalis comes from the Greek khrysallis, "golden pupa of the butterfly," from khrysos, "gold."