The Earthworm is also known as Lumbricina. Earthworms are hermaphrodites, meaning they have both male and female reproductive organs. While mating earthworms overlap with eachother and exchange sperm. After copulation, a ring is formed around the worm. The worm injects its own eggs and the other worm's sperm into the ring. The worm then slips out of the ring and as it does so a cocoon is formed. This is where the embryotic worm develops. After they emerge, the new earthworms a fully formed but lack their sex structures.
This picture shows earthworms during the process of mating.