Ants secrete pheromones from glands on their bodies and use their antennae to detect the pheromone secretions of other ants. Pheromone signals can be used as identification, for marking food collection trails, for sending up alarms, and to warn and confuse enemy ants.
Ants use pheromones in a variety of ways. A foraging ant that finds food leaves a pheromone trail when it returns to the colony. Other members of the colony follow the path, reinforcing the trail with their own pheromone secretions. When the food source is exhausted, the ants no longer follow the path and the pheromone trail slowly dissipates.
An exchange of pheromones allows an ant to determine what nest another ant is from, the social status of that particular ant within the nest and what job it performs.
Pheromones are also used to warn of potential danger. A crushed ant gives off a pheromone alarm that drives nearby ants into an attack frenzy and summons more ants from farther away. Some ants emit a false pheromone warning to confuse enemy ants and make them fight among themselves. Within a colony, foreign pheromones alert soldier ants to the presence of potential enemies and stimulate a defensive response.