Like other major bacterial pathogens, S. aureus asymptomatically colonizes the human body far more frequently than it causes severe infections. This raises the question of what are the evolutionary and genetic differences between infection and asymptomatic colonization? To address this question we have sequenced and analysed S. aureus genomes to chart evolution within hundreds of healthy and infected patients, and to discover genetic differences associated with bacteria infecting and colonizing thousands of unrelated cases and controls. These studies reveal surprising differences in the genetic basis of different types of infection, and reveal signatures of bacterial adaptation within the human body to selection pressures that are as yet incompletely understood.