It is generally regarded that the progression of an infection within host macrophages is the consequence of a failed immune response. However, recent appreciation of macrophage heterogeneity, with respect to both development and metabolism, indicates that the reality is more complex. Different lineages of tissue-resident macrophages respond divergently to microbial, environmental and immunological stimuli. The emerging picture that the developmental origin of macrophages determines their responses to immune stimulation and to infection stresses the importance of in vivo infection models. Recent investigations into the metabolism of infecting microorganisms and host macrophages indicate that their metabolic interface can be a major determinant of pathogen growth or containment. This Review focuses on the integration of data from existing studies, the identification of challenges in generating and interpreting data from ongoing studies and a discussion of the technologies and tools that are required to best address future questions in the field.