These are parasitic worms, sometimes called "tongue worms" because they attach themselves to the tongues and respiratory tracts of their hosts. They have five sets of jaws in their mouths, which they use to grasp onto their host's tissues.
While they're classified as worms, their appearance and lifestyle are quite unique, and they are actually more closely related to arthropods like insects and spiders than to traditional worms.