Microglia and non-parenchymal macrophages in the brain are mononuclear phagocytes that are increasingly recognized to be essential players in the development, homeostasis and diseases of the central nervous system. With the availability of new genetic, molecular and pharmacological tools, considerable advances have been made towards our understanding of the embryonic origins, developmental programmes and functions of these cells. These exciting discoveries, some of which are still controversial, also raise many new questions, which makes brain macrophage biology a fast-growing field at the intersection of neuroscience and immunology. Here, we review the current knowledge of how and where brain macrophages are generated, with a focus on parenchymal microglia. We also discuss their normal functions during development and homeostasis, the disturbance of which may lead to various neurodegenerative and neuropsychiatric diseases.