Prokaryotes can defend themselves against invading mobile genetic elements (MGEs) by acquiring immune memory against them. The memory is a DNA database located at specific chromosomal sites called CRISPRs (clustered regularly interspaced short palindromic repeats) that store fragments of MGE DNA. These are utilised to target and destroy returning MGEs, preventing re-infection. The effectiveness of CRISPR-based immune defence depends on ‘adaptation’ reactions that capture and integrate MGE DNA fragments into CRISPRs. This provides the means for immunity to be delivered against MGEs in ‘interference’ reactions. Adaptation and interference are catalysed by Cas (CRISPR-associated) proteins, aided by enzymes well known for other roles in cells. We survey the molecular biology of CRISPR adaptation, highlighting entirely new developments that may help us to understand how MGE DNA is captured. We focus on processes in Escherichia coli, punctuated with reference to other prokaryotes that illustrate how common requirements for adaptation, DNA capture and integration, can be achieved in different ways. We also comment on how CRISPR adaptation enzymes, and their antecedents, can be utilised for biotechnology.