Most, if not all, bacterial and archaeal cells contain at least one protein filament system. Although these filament systems in some cases form structures that are very similar to eukaryotic cytoskeletons, the term 'prokaryotic cytoskeletons' is used to refer to many different kinds of protein filaments. Cytoskeletons achieve their functions through polymerization of protein monomers and the resulting ability to access length scales larger than the size of the monomer. Prokaryotic cytoskeletons are involved in many fundamental aspects of prokaryotic cell biology and have important roles in cell shape determination, cell division and nonchromosomal DNA segregation. Some of the filament-forming proteins have been classified into a small number of conserved protein families, for example, the almost ubiquitous tubulin and actin superfamilies. To understand what makes filaments special and how the cytoskeletons they form enable cells to perform essential functions, the structure and function of cytoskeletal molecules and their filaments have been investigated in diverse bacteria and archaea. In this Review, we bring these data together to highlight the diverse ways that linear protein polymers can be used to organize other molecules and structures in bacteria and archaea.