Earthworms were a type of invertebrate found on Earth.
The First Doctor once encountered homicidal earthworms which excreted nitrous oxide. Aldridge recalled the incident as "hilarious". (PROSE: A Big Hand for the Doctor)
In 1964, DN6 was tested in Forester's garden, killing an earthworm along with all the other animal life. The First Doctor and Barbara Wright later discovered the dead worm. (TV: Planet of Giants)
A giant earthworm was used during the battle for Alvega when the Controller ordered the worm to attack the three Dalek ships on the ground at the time. (COMIC: The Amaryll Challenge)
Brock offered the Sixth Doctor and Frobisher a worm. The Doctor declined the offer but Frobisher accepted. (COMIC: Once Upon a Time-Lord)
Walter the Worm was an earthworm that lived in the 20th and 21st centuries. He displayed a level of sentience that was not seen in others of his time showing happiness, discomfort, (PROSE: Dr. First, Dr. Seventh) and the initiative to escape from danger, even being able to outrun a group of Daleks. (WC: The Daleks Chase Walter the Worm, PROSE: Dr. Fourth) A blue counterpart of him existed on the Blue Planet. (PROSE: Dr. Sixth)