The central nervous system is closely linked to the immune system at several levels. The brain parenchyma is separated from the periphery by the blood brain barrier, which under normal conditions prevents the entry of mediators such as activated leukocytes, antibodies, complement factors, and cytokines. The myeloid cell lineage plays a crucial role in the development of immune responses at the central level, and it comprises two main subtypes: (1) resident microglia, distributed throughout the brain parenchyma; (2) perivascular macrophages located in the brain capillaries of the basal lamina and the choroid plexus. In addition, astrocytes, oligodendrocytes, endothelial cells, and, to a lesser extent, neurons are implicated in the immune response in the central nervous system. By modulating synaptogenesis, microglia are most specifically involved in restoring neuronal connectivity following injury. These cells release immune mediators, such as cytokines, that modulate synaptic transmission and that alter the morphology of dendritic spines during the inflammatory process following injury. Thus, the expression and release of immune mediators in the brain parenchyma are closely linked to plastic morphophysiological changes in neuronal dendritic spines. Based on these observations, it has been proposed that these immune mediators are also implicated in learning and memory processes.