Emerging genetic studies of late-onset Alzheimer’s Disease implicate the brain’s resident macrophages in the pathogenesis of AD. More than half the risk genes associated with late-onset AD are selectively expressed in microglia and peripheral myeloid cells; yet we know little about the underlying biology or how myeloid cells contribute to AD pathogenesis. Using single-cell RNA sequencing and spatial transcriptomics we identified molecular signatures that can be used to localize and monitor distinct microglia functional states in the human and mouse brain. Our results show that microglia assume diverse functional states in development, aging and injury, including populations corresponding to known microglial functions including proliferation, migration, inflammation, and synaptic phagocytosis. We identified several innate immune pathways by which microglia recognize and prune synapses during development and in models of Alzheimer’s disease, including the classical complement cascade. Illuminating the mechanisms by which developing synaptic circuits are sculpted is providing important insight on understanding how to protect synapses in Alzheimer’s and other neurodegenerative diseases of synaptic dysfunction.