Insect venoms are comprised of amino acids, peptides and proteins. They may include alkaloids, terpenes, polysaccharides, biogenic amines (e.g., histamine), and organic acids (e.g., formic acid). Venoms also may contain allergenic proteins, which can trigger a potentially lethal immune response in sensitive individuals.
Biting and stinging are separate actions in ants. Some ants bite and do not sting. Some bite and spray venom on the bitten area. Some bite and inject formic acid with a stinger. Harvester and fire ants bite and sting in a two-part process. The ants will grab hold with their mandibles, and then pivot around, repeatedly stinging and injecting venom. The venom includes an alkaloid poison. Fire ant venom includes an alarm pheromone which chemically alerts other ants in the vicinity. Chemical signalling is why the ants all appear to sting at once... that is essentially what they do.
What Is the Most Poisonous Chemical? | Natural Mosquito Repellents
Image: Did you know fire ants could be black as well as red or brown? (USDA ARS)