Abhilash gave an overview of the morphology and functions of microglia - these cells are of mesodermal origin - from hematopoietic cells - and are found in higher concentrations where circulation is higher, synaptic density is higher and neuronal activity is higher.
Amoeboid microglia are a highly mobile phagocytic form that are active especially during development. Resting microglia have ramified branches and facilitate synapses. Activated microglia retract their branching processes and have a higher secretory functions (pro-inflammatory cytokines such as IL-1, TNF alpha, ROS, NO etc). In the phagocytic phase, they have no processes at all and engulf debris. Multinucleated microglia are found in aging and HIV patients and these cannot differentiate between live and dead neurons. Gitter cells are post phagocytic microglia.
Actin remodeling takes place via the Rac signaling pathway. Damaged cells secrete more ATP (beyond the threshold, as ATP is also released as co-transmitter during normal synaptic activity) and this is picked up by the purinergic receptors (P2X4R, ionotropic - cause migration) and (P2Y2R, G-protein coupled - causes rapid process extension).