Snails and slugs have evolved to eat just about everything; they are herbivorous, carnivorous, omnivorous, and detritivores (eating decaying waste from plants and other animals).
There are specialist and generalist species that eat worms, vegetation, rotting vegetation, animal waste, fungus, and other snails.
Snails and slugs eat with a jaw and a flexible band of thousands of microscopic teeth, called radula.
Radulae scrape up, or rasp, food particles as the jaw cuts off larger pieces of food, like leaves, to be rasped by radulae.