Many bacteria swim using flagella - long tails that are attached to tiny motors made of proteins, just tens of nanometres wide. These motors spin the flagella, which work as nanoscale propellers to drive the bacterium forward.
Despite motors in diverse bacteria having the same core structure, different bacteria vary widely in their swimming power. For example, Campylobacter jejuni, which causes food poisoning, can swim powerfully enough to bore through the mucus that lines the gut, an environment too thick and sticky for other bacteria to push through.