Capture and observe your own earthworm, or watch the following video, and note how it moves.
Note how it contracts contracts “belt” muscles around its body, which squeezes its front portion forward. It has tiny barbs on to the sides of its under surface that it projects to hang onto the soil while it contracts longitudinal muscles that pull its hind portions forward. (When you handle an large earthworm, you may feel the barbs.) Note how different portions of the worm can move independently using the same process.