An earthworm is a type of invertebrate animal that lives in soil and has a long, soft body. They are part of the annelid family which also includes other creatures such as leeches and segmented worms. Earthworms play an important role in breaking down organic matter in the soil, aerating it by creating tunnels and improving its fertility through their castings (excrement). They are commonly found in gardens, forests, grasslands, and other natural habitats around the world.