The B-cell immune response is a remarkable evolutionary system found in jawed vertebrates. B-cell receptors, the membrane-bound form of antibodies, are capable of evolving high affinity to almost any foreign protein. High germline diversity and rapid evolution upon encounter with antigen explain the general adaptability of B-cell populations, but the dynamics of repertoires are less well understood. These dynamics are scientifically and clinically important. After highlighting the remarkable characteristics of naive and experienced B-cell repertoires, especially biased usage of genes encoding the B-cell receptors, we contrast methods of sequence analysis and their attempts to explain patterns of B-cell evolution. These phylogenetic approaches are currently unlinked to explicit models of B-cell competition, which analyse repertoire evolution at the level of phenotype, the affinities and specificities to particular antigenic sites. The models, in turn, suggest how chance, infection history and other factors contribute to different patterns of immunodominance and protection between people. Challenges in rational vaccine design, specifically vaccines to induce broadly neutralizing antibodies to HIV, underscore critical gaps in our understanding of B cells' evolutionary and ecological dynamics.