To understand how earthworms move, you must first understand their anatomy. Most earthworms in the United States are between three and 10 inches long. Their bodies are cylindrical, muscular and divided into small segments. No appendages protrude from the long, sleek body, which makes these worms able to move well through long, narrow passages in the ground. Earthworms have a simple brain that can detect changes in light through special cells in the skin. Movements occur in response to changes in light and also in response to touch and certain chemicals.
Earthworms use their muscles to extend their bodies when moving forward. Once they extend, they extend tiny hairlike structures known as setae from inside their bodies down into the soil. These setae act as an anchor so that the worms can then pull the rear part of their bodies forward. Once the back part of the body has been advanced, earthworms retract the setae from the front of their bodies and insert other setae positioned in the rear of their bodies. This allows them to anchor once more, this time pushing their front halves forward again.
The movement of the earthworm creates tiny tunnels through the soil. This process of burrowing aerates the soil, allowing water and air to pass through more freely. This aeration, in turn, benefits plants by allowing them better access to air and moisture as well as an environment conducive to the advancement of root structures. As earthworms move through the soil, they also deposit waste rich in fertilizing compounds such as phosphorus, nitrogen, calcium and magnesium.