Flocking is the behavior exhibited when a group of birds, called a flock, are foraging or in flight.
Computer simulations and mathematical models that have been developed to emulate the flocking behaviours of birds can also generally be applied to the "flocking" behaviour of other species. As a result, the term "flocking" is sometimes applied, in computer science, to species other than birds.
source (Wikipedia): Flocking algorithm