Ants use pheromones in a number of different ways, such as releasing ‘danger’ pheromones upon death to alert nearby ants, or to create chemical trails from their nest to promising food sources. Other ants in the colony can use their antennas to detect these pheromones and respond accordingly.

Trail pheromones are semiochemicals secreted from the body of an individual to impact the behavior of another individual receiving it. Trail pheromones often serve as a multi purpose chemical secretion that leads members of its own species towards a food source, while representing a territorial mark in the form of an allomone to organisms outside of their species. Specifically, trail pheromones are often incorporated with secretions of more than one exocrine gland to produce a higher degree of specificity. Considered one of the primary chemical signaling methods in which many social insects depend on, trail pheromone deposition can be considered one of the main facets to explain the success of social insect communication today. Many species of ants, including those in the genus Crematogaster use trail pheromones.

The pheromone is synthesized in the same region as venom, or other primary hormonal departments within the organism. Often, trail pheromone synthesis occurs in the ventral venom gland, poison gland, Dufour's gland, sternal gland, or hindgut.

More Info: en.wikipedia.org