An abscess is a localized collection of pus that forms in response to infection, injury, or foreign material in the body. It usually occurs when the body’s immune system tries to fight off an infection, leading to the accumulation of pus, which is made up of dead cells, bacteria, and other debris.