Here is some information taken from a website I found this evening.
A caterpillar (larva) will make a chrysalis (for butterflies) or a cocoon (for moths). It will spin some thread around its middle section (called the belt) and produce a patch of coiled thread at its tail end (called the pillow). It's skin will be shed for the last time and a shell will form underneath its shed skin. This shell hardens into a protective case which is the chrysalis.