Inflammation is part of the process by which the immune system defends the body from harmful agents, such as bacteria and viruses. Acute inflammation is triggered by injury, infection, or exposure to substances, and presents itself as pain, redness, swelling, loss of function, and heat.