Dear student.
Earthworms have a fluid skeleton and strong muscles. They have bristles underneath their body. These bristles grip the ground while the muscles contract and push themselves forward before lengthening.
Earthworm moves by first extending the front part of its body while keeping its rear portion fixed on the soil. Then, it fixes the front portion on the soil and releases its rear end. It then shortens its body and pulls the rear end forward.
Regards.