Five pairs of hearts surround the esophagus. These pump blood into large blood vessels. From the large blood vessels, the blood flows into smaller vessels, and eventually flows into capillaries. From capillaries, the blood flows into larger vessels and, eventually, back to the heart. This type of circulatory system in which blood is always contained within blood vessels or the hearts is called a closed circulatory system.
Digestive waste leaves the earthworm through the anus.
Nitrogen waste is carried by blood to nephridia. The nephridia are surrounded by capillaries. The nitrogen waste diffuses from the blood into the nephridia. The nephridia have pores in the epidermis of the earthworm, and nitrogen waste is released from these pores into the soil surrounding the worm. Since the earthworm is in close contact with the soil releasing ammonia would harm the animal.