The neuroimmune system is involved in development, normal functioning, aging, and injury of the central nervous system. Microglia, first described a century ago, are the main neuroimmune cells and have three essential functions: a sentinel function involved in constant sensing of changes in their environment, a housekeeping function that promotes neuronal well-being and normal operation, and a defense function necessary for responding to such changes and providing neuroprotection. Microglia use a defined armamentarium of genes to perform these tasks. In response to specific stimuli, or with neuroinflammation, microglia also have the capacity to damage and kill neurons. Injury to neurons in Alzheimer's, Parkinson's, Huntington's, and prion diseases, as well as in amyotrophic lateral sclerosis, frontotemporal dementia, and chronic traumatic encephalopathy, results from disruption of the sentinel or housekeeping functions and dysregulation of the defense function and neuroinflammation. Pathways associated with such injury include several sensing and housekeeping pathways, such as the Trem2, Cx3cr1 and progranulin pathways, which act as immune checkpoints to keep the microglial inflammatory response under control, and the scavenger receptor pathways, which promote clearance of injurious stimuli. Peripheral interference from systemic inflammation or the gut microbiome can also alter progression of such injury. Initiation or exacerbation of neurodegeneration results from an imbalance between these microglial functions; correcting such imbalance may be a potential mode for therapy.