When ants bite, they inject formic acid into the wound. Formic acid is a compound that is naturally produced by ants and is stored in a specialized gland called the venom gland. When an ant bites, it releases formic acid through its mandibles into the skin of its target. The formic acid serves as a defensive mechanism for the ant, causing a burning or stinging sensation and sometimes an allergic reaction in humans. Different species of ants may have varying levels of formic acid concentration in their venom.