Annelid worm of the class Oligochaeta. Earthworms are hermaphroditic and deposit their eggs in cocoons. They live by burrowing in the soil, feeding on the organic matter it contains. They are vital to the formation of humus, aerating the soil and levelling it by transferring earth from the deeper levels to the surface as castings.