As far as animals go, the earthworm is pretty no-frills. It's essentially an eating (and defecating) machine. A mouth at the front end of the earthworm leads to what amounts to a long tube where the organic matter and dirt from the worm's diet pass through until it exits the other end. Along the way, organic matter is pushed into the crop, where food is stored, and then into a gizzard, where tiny pebbles previously eaten by the worm are used to grind food for further digestion. The intestinal walls of the worm are lined with blood vessels that are effused with blood by one of the aortic arches, the earthworm's five hearts. The vessels absorb and distribute nutrients from the food. On its way out, microbes living in the worm may attach to the dirt and remaining organic material, and the entire package is deposited as worm feces, called castings. These castings may be deposited within the dirt or in tiny, cone-shaped piles with a hollow center on the surface of the ground.
That's pretty much the long and short of the earthworm's existence, but in addition to having five hearts, the earthworm has some other interesting anatomical features. Breathing through its skin is one. An earthworm lacks any kind of lungs, but like any other aerobic organism, it still needs oxygen to carry out essential processes and to rid itself of carbon dioxide that builds up as waste. Instead of inhaling and exhaling like us, the exchange of these gases in and out of the earthworm takes place passively through the skin. An earthworm can even survive submerged in water if it contains enough available oxygen.
For this breathing to occur, an earthworm's skin must always be moist. This need is generally assured by the mucus the worm excretes naturally through its skin. But earthworm slime is no match for hot, dry air. Without enough moisture at the skin, the gas exchange can't occur and the worm can't breathe. If you've ever seen a dead, desiccated earthworm curled up on a sidewalk on a warm day, you've likely met an earthworm that suffocated to death.
Because this need to avoid heat necessitates staying out of the sun, earthworms have evolved a means of determining if the sun's out. This leads us to yet another interesting earthworm fact: They don't have eyes but they can detect light. Specialized photosensitive cells on the earthworm's skin convert light into electrical impulses that the worm senses and reacts to, moving back below ground or under the cover of plant matter.