The tail is a
flagellum, which is also a fancy array of proteins. It consists of
microtubules in a "9 + 2" arrangement, which means there are nine pairs of them around the outside two in the center. Each pair if microtubules is connected to its partner by
dynein, another protein, which pulls along the other microtubule like you would climb a ladder. Normally this sort of movement would make one tubule slide along the other, but these two are bound at the root, so they
bend instead, making the whole tail bend. This is coordinated in such a way as to let them
swim.