Asthma remains an important human disease that is responsible for substantial worldwide morbidity and mortality. The causes of asthma are multifactorial and include a complex mix of environmental, immunological and host genetic factors. In addition, epidemiological studies show strong associations between asthma and infection with respiratory pathogens, including common respiratory viruses such as rhinoviruses, human respiratory syncytial virus, adenoviruses, coronaviruses and influenza viruses, as well as bacteria (including atypical bacteria) and fungi. In this Review, we describe the many roles of microorganisms in the risk of developing asthma and in the pathogenesis of and protection against the disease, and we discuss the mechanisms by which infections affect the severity and prevalence of asthma.