Earthworm - Digestive/Excretory System
The digestive/excretory system of an earthworm is very simple. In short, food goes in one end and comes out the other. Niphridia, which are analogous with human kidneys, are found in pairs in every segment except for the first three and the last one (Musurca). Although some water is reabsorbed by the blood, the remainder is excreted through the ventral pores, or nephridia. Digestion, on the other hand, is similar to that of human beings except an earthworm has a crop and a gizzard. With the help of the pharyngeal muscles on either side of the pharynx, a worm actually sucks in its food. From the pharynx, the food moves to the esophagus and then into the crop for storage until the rest of the tract is clear. From there the food moves to the gizzard where the soil is ground up with little stones, releasing organic matter. Nutrients are absorbed by the worm when the food passes through its intestine, which ends with the anus (Loretto).
Picure retrieved from http://www.vermi-cast.com/whomakesit.htm
An earthworm's solid waste, called castings, are very important because they add nutrients to and aerate the soil they live in. Virtually all soil is earthworm castings. Earthworms will eat anythings from dead leaves to dead animals to any soil that is in their way.