Microglia are immune cells in the central nervous system (CNS, which is the brain and spinal cord) that protect it from harmful pathogens. Microglia are a type of glial cell and are the fastest cells in the brain.
They move and scan the CNS for infection, damage, and brain plaque. They have their own territory that they patrol and don't overlap. The brain is mostly protected by the blood brain barrier which prevents most toxins and infections from being able to reach the brain. If something does breach this barrier the microglia are activated and quickly jump into action by fighting the infectious pathogens that are trying to damage the brain.
Microglia are very sensitive to the presence of pathogens - this is a necessity because most antibodies can't cross the blood brain barrier and therefore damaging infection could cause serious damage in a short amount of time if unchecked.