Pus is the result of the body's natural immune system automatically responding to an infection, usually caused by bacteria or fungi. Leukocytes, or white blood cells, are produced in the marrow of bones. They attack the organisms that cause infection.