Different Species
Obviously enough, earthworms and snails belong to different species. The name earthworm refers to several different species, all of which form the larger subclass Oligochaeta. Just as there are many species of earthworm, so are there a great many species of snails, though all belong to the class Gastropoda. Snails are those members of the Gastropoda that have coiled shells, while members without shells are slugs.
Habitat
Snails are found in almost all climates on Earth, with lunged varieties living on land and gilled varieties living in both fresh and salt water. Amphibious varieties can also live between the two. Earthworms spend almost their entire lives living beneath the ground, though different species often confine themselves to a particular type of earth, such as river mud or decaying leaves.
Sex and Reproduction
Earthworms and most species of snail are hermaphrodites, meaning that they produce both sperm and egg within the same body and swap sperm with sexual partners. However, in the earthworm, copulation and reproduction are separate events, with the worm holding the sperm separate from its eggs for some time before ejecting both sperm and egg together into a cocoon where the young snails are produced. Snails produce eggs, which different species lay in different locations.
Locomotion
The snail moves by undulating its single muscular foot, movements which are quite visible to the naked eye. It produces mucus to reduce the friction between it and the surface it travels on. An earthworm also produces mucus to lower friction with the earth, but moves by contraction and expansion, wedging itself in place with the rear section of its body, narrowing and extending the front section and then widening the front section to jam it in place. The earthworm then narrows and contracts the rear section of its body to bring it forward.
Diet and Predators
Snails of different species have very different diets; some may be carnivorous while others are are herbivores or detritivores. Earthworms consume the soil whole and digest organic detritus. This process helps break down the organic matter in the soil, mixing the nutrients in the ground and making them available to plants. Both earthworms and snails are eaten by small animals such as birds, frogs and lizards, though the snail obviously has slightly better protection. Snails are considered a delicacy in several countries, most notably France, while earthworms are yet to prove popular.