The Cocoons are the second stage of the Gremlin life cycle, being the penultimate stage before the Gremlin itself.
From Mogwai to Gremlin
After they eat after midnight, the Mogwai forms a slimy cocoon that wraps around them. Inside, the Mogwai goes through a metamorphosis from a small and furry creature, to a tall and scaly creature, they're known as Gremlins. The process usually takes a couple of hours and afterwards, they hatch and come out of their cocoons as Gremlins, ready to wreck havoc and destruction.
This process was very similar to that of a caterpillar when it metamorphoses inside its cocoon to become a butterfly.