The nephridia in an earthworm are part of the excretory system. Nephridia are small, tubular structures that function like kidneys to filter and remove metabolic waste products from the body. In earthworms, they are located in pairs in each segment of the body and are responsible for removing nitrogenous waste from the blood and excreting it out of the body as urine.