The tumour suppressor p53 has a central role in the response to cellular stress. Activated p53 transcriptionally regulates hundreds of genes that are involved in multiple biological processes, including in DNA damage repair, cell cycle arrest, apoptosis and senescence. In the context of DNA damage, p53 is thought to be a decision-making transcription factor that selectively activates genes as part of specific gene expression programmes to determine cellular outcomes. In this Review, we discuss the multiple molecular mechanisms of p53 regulation and how they modulate the induction of apoptosis or cell cycle arrest following DNA damage. Specifically, we discuss how the interaction of p53 with DNA and chromatin affects gene expression, and how p53 post-translational modifications, its temporal expression dynamics and its interactions with chromatin regulators and transcription factors influence cell fate. These multiple layers of regulation enable p53 to execute cellular responses that are appropriate for specific cellular states and environmental conditions.