An earthworm's digestive system runs through the length of its body. It conducts respiration through its skin. It has a double transport system composed of coelomic fluid that moves within the fluid-filled coelom and a simple, closed blood circulatory system. It has a central and a peripheral nervous system. The central nervous system consists of two ganglia above the mouth, one on either side, connected to a nerve cord running back along its length to motor neurons and sensory cells in each segment. Large numbers of chemoreceptors are concentrated near its mouth. Circumferential and longitudinal muscles on the periphery of each segment enable the worm to move.And this is why they wiggle:
Touching an earthworm, which causes a "pressure" response as well as (often) a response to the dehydrating quality of the salt on human skin (toxic to earthworms), stimulates the subepidermal nerve plexus which connects to the intermuscular plexus and causes the longitudinal muscles to contact, thereby the writhing movements when we pick up an earthworm. This behaviour is a reflex and does not require the CNS; it occurs even if the nerve cord is removed. Each segment of the earthworm has its own nerve plexus. The plexus of one segment is not connected directly to that of adjacent segments.I never knew that. You learn something every day.