Leeches are segmented parasitic or predatory worms that comprise the subclass Hirudinea within the phylum Annelida. They are closely related to the oligochaetes, which include the earthworm, and like them have soft, muscular segmented bodies that can lengthen and contract. Both groups are hermaphrodites and have a clitellum, but leeches typically differ from the oligochaetes in having suckers at both ends and ring markings that do not correspond with their internal segmentation. The body is muscular and relatively solid; the coelom, the spacious body cavity found in other annelids, is reduced to small channels.
The majority of leeches live in freshwater habitats, while some species can be found in terrestrial or marine environments. The best-known species, such as the medicinal leech, Hirudo medicinalis, are hematophagous, attaching themselves to a host with a sucker and feeding on blood, having first secreted the peptide hirudin to prevent the blood from clotting. The jaws used to pierce the skin are replaced in other species by a proboscis which is pushed into the skin. A minority of leech species are predatory, mostly preying on small invertebrates.