The pharynx comes directly after the mouth in the earthworm digestive system, where it acts as a suction pump, drawing in food items. It also excretes mucus to aid digestion in later stages. After the pharynx come the esophagus, the crop, the gizzard and the intestines.
As food passes from the pharynx into the esophagus, the esophagus releases calcium carbonate to rid the earthworm of excess calcium and control the acidity of the food. The food then enters the crop, where it is stored for later use. Once the earthworm is ready, the food passes to the gizzard, which uses small mineral particles ingested with the food combined with strong muscular contractions to grind up the food. Finally, the intestines release chemicals to aid digestion and absorb any nutrients released. The chemicals the intestines release are enzymes, each capable of digesting protein, carbohydrates or fats.
An earthworm has an anus for releasing solid or undigested waste, but it is not used for many chemical, liquid wastes. Instead, an earthworm has multiple structures analogous to human kidneys in many of its segments. These remove toxins and metabolic wastes from the blood and release the waste from multiple pores along the sides of the body.