Interesting little pains in the neck! 🐜
They use pheromones to communicate. They smell the various chemical signals they're sending to one another, through mainly their antenna.
If an ant finds a source of tasty food, as it returns to the nest it'll leave behind a pheromone trail for others to follow.
Did you know if you squish an ant and spread a thin trail of guts, other ants will follow the "trail"?