Earthworms are hermaphroditic, having both male and female reproductive organs. To mate worms align themselves head-to-head and exchange sperm from the clitellum (thickened glandular band at the anterior end of adult worms). After mating the clitellum produces a thick mucus ring which hardens and begins to form the cocoon. The worm’s own egg is then deposited into the forming cocoon as it begins its slide over the head. It then seals at both ends forming a small pearl-like cocoon.
Each worm will continue to produce cocoons (without needing to mate again) for as long as the donated sperm supply lasts.
In the case of Red Worms (Eisenia fetida), each cocoon typically produces 2 -20 baby worms, which under favorable conditions hatch out in 2-6 weeks. Temperature, moisture content, population and acidity of soil determine how long it takes for a cocoon to hatch. If poor conditions prevail, cocoons can remain in a dormant state for years.