Bacteria have developed a large array of motility mechanisms to exploit available resources and environments. These mechanisms can be broadly classified into swimming in aqueous media and movement over solid surfaces. Swimming motility involves either the rotation of rigid helical filaments through the external medium or gyration of the cell body in response to the rotation of internal filaments. On surfaces, bacteria swarm collectively in a thin layer of fluid powered by the rotation of rigid helical filaments, they twitch by assembling and disassembling type IV pili, they glide by driving adhesins along tracks fixed to the cell surface and, finally, non-motile cells slide over surfaces in response to outward forces due to colony growth. Recent technological advances, especially in cryo-electron microscopy, have greatly improved our knowledge of the molecular machinery that powers the various forms of bacterial motility. In this Review, we describe the current understanding of the physical and molecular mechanisms that allow bacteria to move around.