What classification is a worm?
There are several types of worms that fall into several different phyla. Some, like earthworms, prefer the soil (Terrestrial worm phyla include annelids and aschelminths.)
Some phyla are animal parasites, for example the flatworms (platyhelminths).
And others are nonparasitic and just live elsewhere, like the Nemertea phylum, which contains marine worms such as the marine nemertean worm, the longest worm at up to 55 meters.