Flagellated bacteria, such as Escherichia coli, swim by rotating thin helical filaments, each driven at its base by a reversible rotary motor, powered by an ion flux. A motor is about 45 nm in diameter and is assembled from about 20 different kinds of parts. It develops maximum torque at stall but can spin several hundred Hz. Its direction of rotation is controlled by a sensory system that enables cells to accumulate in regions deemed more favorable. We know a great deal about motor structure, genetics, assembly, and function, but we do not really understand how it works. We need more crystal structures. All of this is reviewed, but the emphasis is on function.