An earthworm, also known as an annelid, is an invertebrate which lives in soil and consumes detritus.
Anatomically, earthworms are divided into many segments, and have multiple hearts. Earthworms reproduce hermaphroditically, which is to say that each worm contains both male and female sexual organs, and each worm fertilizes the other. Worms feed by ingesting dead plant and animal matter and their excretions are highly valued by farmers and gardeners as a nitrogen-rich soil additive. Their underground tunnels improve drainage and allow air to plant roots.