Collective nouns are used to describe a group of objects or animals thinking or moving the same way.
For example, you may see a few bees in your garden: One flying over the garden, one sitting on a flower and the other is chasing your brother. This is just three bees.
If those bees are chasing your brother at the same time, he is facing a swarm of bees. Look out!
Army of ants
This term is used to describe many ants behaving in the same manner as each other.
Ants travel in a line because they communicate to their colony by scent. If they find a food source, they travel to that source leaving the scent behind them for the other ants to follow. As they travel back to their colony, they carry the food back to the nest.
The army of ants is often observed when there is a live predator or prey. Ants will congregate in an army like fashion to kill and eat their target.