In its fight to attack germs or other targets, your immune system releases chemicals. These chemicals cause inflammation, which is pain, redness, warmth, and swelling. For example, inflammation from a throat infection makes your throat red, swollen and sore.