A swarm is a moving crowd: a great number of discrete items in permanent movement. In short, a swarm is a group of animals that aggregate and travel in the same direction. Many social insects form swarms, such as ants, termites, locusts, wasps, and honey bees. Other examples are schools of fish, flocks of birds, herds of land animals. A swarm can exhibt interesting forms of swarm intelligence. A typical swarm has no permanent central leader. It can be described by a group of similar agents who share the same place and move in the same direction, for example through the Boids model. Guy Theraulaz defined a swarm like this: "A swarm is a group of active and mobile elements which can communicate with each other and thereby influence each other's actions" (in Artificial Life, Chris Langton (Ed.), The MIT Press, 1997).
The rules to form a swarm are simple: stay close to the group, but don't come too close to individuals. Birds and fishes in swarms avoid their neighbors at close distances, but otherwise are attracted to each other, i.e. they interact through short-range repulsion and longer-range attraction rules. This has been confirmed by recent studies [1,2].
Studies that have explicitly determined interaction rules in moving groups:
 James E. Herbert-Read et al., Inferring the rules of interaction of shoaling fish, PNAS 2011
 Yael Katz et al., Inferring the rules of interaction of shoaling fish, PNAS 2011
- Wikipedia Link for Swarm behaviour