There are two broad types of worms. One is flat, eg tapeworms, and the other is round, eg Garden worms. It is only the round worms that I will talk about today.
Earthworms are like a long hollow muscular tube. They eat into the soil with their mouth. The soil then passes down the hollow gut where the nutrients are absorbed, and the rest is left in the soil behind the worm, where the enzymes and bacteria from the gut keep breaking down the soil thus making it a better place for the plants.
Earthworms do not have lungs but breathe oxygen by gas exchange through their moist skin, so need to keep moist or they will die. This is a good reason to keep the soil moist near your Compot so that any worms near will be able to get to the Compot to feed on its contents.
These wrigglers have no eyes but can feel any sunlight on them so they move underground to get out of the sunlight. One very good reason to cover your Compot with grass clippings, straw, sugar cane mulch or leaves.
Earthworms can consume up to half their weight each day so are really working hard for their “owners”. Inside worms are a lot of useful Bacteria that help to break down any feed eaten and it is these Bacteria that continue to breakdown any Organic Matter in the soil after they have left the worm. Mixed with the Bacteria inside each worm are some grains of sand that grind up the food helping the Bacteria digest the food.