Some of the things that worms eat include dead plants, live plants, dead animals, animal poo, and other microscopic animals. After they eat, they grind up and digest their food and pass the rest as waste, called castings, which go back into the soil and help plants grow and stay healthy. Animal manures are an important food source for earthworms. They eat living organisms such as nematodes, protozoans, rotifers, bacteria, fungi in soil. Worms will also feed on the decomposing remains of other animals. Its mouth is also its anus. If separated, a piece of its body can grow into another worm. And the worm liquefies prey, which it then sucks through its mouth, excreting waste from the same opening later. That's a taboo, worms don't like to talk about it. Seriously though, they seem to decompose very fast. Way faster than most of the food scraps in the bin. So we don't "see" (at least I don't) worms eating dead worms, because the latter are already unrecognizable as worms. Small lizards, salamanders and toads eat worms and wormlike insect larvae. Ground-crawling insects, particularly ground beetles, along with centipedes and flatworms, also prey on worms and similar creatures.
Once the animal is immobilized, the ribbon worm swallows its prey whole, and they can eat animals almost as big as they are by stretching their bodies to fit the animal inside. Ribbon worms protect themselves from predators by secreting toxic slime, but some fish, crabs, seabirds and even other ribbon worms eat them.
The presence of male sperm and seminal fluid causes female worms to shrivel and die after giving birth, Princeton University researchers reported this week in the journal Science. The demise of the female appears to benefit the male worm by removing her from the mating pool for other males.
If an earthworm is split in two, it will not become two new worms. The head of the worm may survive and regenerate its tail if the animal is cut behind the clitellum. But the original tail of the worm will not be able to grow a new head (or the rest of its vital organs), and will instead die.