When the body detects a pathogen, such as a virus, bacteria, or fungus, immune cells like macrophages and dendritic cells are activated. These cells release cytokines, which are signaling molecules that recruit other immune cells to the site of infection. This results in the characteristic signs of inflammation: redness, heat, swelling, and pain.