Swarming
The forming of such swarms is not out of instinct, but an adaptive behavior – a "consensus" – between the individuals within the swarms. It is also suggested that swarming is a ritual, because there is rarely any male midge by itself and not in a swarm. This could have formed due to the benefit of lowering inbreeding by having males of various genes gathering in one spot. The genus Culicoides, also known as biting midges, have displayed swarming behavior which are believed to cause confusion in predators.

Cockroaches: Cockroaches leave chemical trails in their feces as well as emitting airborne pheromones for mating. Other cockroaches will follow these trails to discover sources of food and water, and also discover where other cockroaches are hiding. Thus, groups of cockroaches can exhibit emergent behaviour, in which group or swarm behaviour emerges from a simple set of individual interactions.
Cockroaches are mainly nocturnal and will run away when exposed to light. A study tested the hypothesis that cockroaches use just two pieces of information to decide where to go under those conditions: how dark it is and how many other cockroaches there are. The study conducted by José Halloy and colleagues at the Free University of Brussels and other European institutions created a set of tiny robots that appear to the roaches as other roaches and can thus alter the roaches' perception of critical mass. The robots were also specially scented so that they would be accepted by the real roaches.

Locusts: Locusts are the swarming phase of the short-horned grasshoppers of the family Acrididae. Some species can breed rapidly under suitable conditions and subsequently become gregarious and migratory. They form bands as nymphs and swarms as adults—both of which can travel great distances, rapidly stripping fields and greatly damaging crops. The largest swarms can cover hundreds of square miles and contain billions of locusts. A locust can eat its own weight (about 2 grams) in plants every day. That means one million locusts can eat more than one tonne of food each day, and the largest swarms can consume over 100,000 tonnes each day.
Swarming in locusts has been found to be associated with increased levels of serotonin which causes the locust to change colour, eat much more, become mutually attracted, and breed much more easily. Researchers propose that swarming behaviour is a response to overcrowding and studies have shown that increased tactile stimulation of the hind legs or, in some species, simply encountering other individuals causes an increase in levels of serotonin. The transformation of the locust to the swarming variety can be induced by several contacts per minute over a four-hour period. Notably, an innate predisposition to aggregate has been found in hatchlings of the desert locust, Schistocerca gregaria, independent of their parental phase.
An individual locust's response to a loss of alignment in the group appears to increase the randomness of its motion, until an aligned state is again achieved. This noise-induced alignment appears to be an intrinsic characteristic of collective coherent motion.

Migratory behavior: Insect migration is the seasonal movement of insects, particularly those by species of dragonflies, beetles, butterflies, and moths. The distance can vary from species to species, but in most cases these movements involve large numbers of individuals. In some cases the individuals that migrate in one direction may not return and the next generation may instead migrate in the opposite direction. This is a significant difference from bird migration.
Monarch butterflies are especially noted for their lengthy annual migration. In North America they make massive southward migrations starting in August until the first frost. A northward migration takes place in the spring. The monarch is the only butterfly that migrates both north and south as the birds do on a regular basis. But no single individual makes the entire round trip. Female monarchs deposit eggs for the next generation during these migrations. The length of these journeys exceeds the normal lifespan of most monarchs, which is less than two months for butterflies born in early summer. The last generation of the summer enters into a non-reproductive phase known as diapause and may live seven months or more. During diapause, butterflies fly to one of many overwintering sites. The generation that overwinters generally does not reproduce until it leaves the overwintering site sometime in February and March. It is the second, third and fourth generations that return to their northern locations in the United States and Canada in the spring. How the species manages to return to the same overwintering spots over a gap of several generations is still a subject of research; the flight patterns appear to be inherited, based on a combination of the position of the sun in the sky and a time-compensated Sun compass that depends upon a circadian clock that is based in their antennae.

Birds: 

Bird migration: Approximately 1800 of the world's 10,000 bird species are long-distance migrants. The primary motivation for migration appears to be food; for example, some hummingbirds choose not to migrate if fed through the winter. Also, the longer days of the northern summer provide extended time for breeding birds to feed their young. This helps diurnal birds to produce larger clutches than related non-migratory species that remain in the tropics. As the days shorten in autumn, the birds return to warmer regions where the available food supply varies little with the season. These advantages offset the high stress, physical exertion costs, and other risks of the migration such as predation.
Many birds migrate in flocks. For larger birds, it is assumed that flying in flocks reduces energy costs. The V formation is often supposed to boost the efficiency and range of flying birds, particularly over long migratory routes. All the birds except the first fly in the upwash from one of the wingtip vortices of the bird ahead. The upwash assists each bird in supporting its own weight in flight, in the same way a glider can climb or maintain height indefinitely in rising air. Geese flying in a V formation save energy by flying in the updraft of the wingtip vortex generated by the previous animal in the formation. Thus, the birds flying behind do not need to work as hard to achieve lift. Studies show that birds in a V formation place themselves roughly at the optimum distance predicted by simple aerodynamic theory. Geese in a V-formation may conserve 12–20% of the energy they would need to fly alone. Red knots and dunlins were found in radar studies to fly 5 km per hour faster in flocks than when they were flying alone. The birds flying at the tips and at the front are rotated in a timely cyclical fashion to spread flight fatigue equally among the flock members. The formation also makes communication easier and allows the birds to maintain visual contact with each other.

Other animals may use similar drafting techniques when migrating. Lobsters, for example, migrate in close single-file formation "lobster trains", sometimes for hundreds of miles.
The Mediterranean and other seas present a major obstacle to soaring birds, which must cross at the narrowest points. Massive numbers of large raptors and storks pass through areas such as Gibraltar, Falsterbo, and the Bosphorus at migration times. More common species, such as the European honey buzzard, can be counted in hundreds of thousands in autumn. Other barriers, such as mountain ranges, can also cause funnelling, particularly of large diurnal migrants. This is a notable factor in the Central American migratory bottleneck. This concentration of birds during migration can put species at risk. Some spectacular migrants have already gone extinct, the most notable being the passenger pigeon. During migration the flocks were a mile (1.6 km) wide and 300 miles (500 km) long, taking several days to pass and containing up to a billion birds.

Marine life: 

Fish: The term "shoal" can be used to describe any group of fish, including mixed-species groups, while "school" is used for more closely knit groups of the same species swimming in a highly synchronised and polarised manner.
Fish derive many benefits from shoaling behaviour including defence against predators (through better predator detection and by diluting the chance of capture), enhanced foraging success, and higher success in finding a mate. It is also likely that fish benefit from shoal membership through increased hydrodynamic efficiency.
Fish use many traits to choose shoalmates. Generally they prefer larger shoals, shoalmates of their own species, shoalmates similar in size and appearance to themselves, healthy fish, and kin (when recognised). The "oddity effect" posits that any shoal member that stands out in appearance will be preferentially targeted by predators. This may explain why fish prefer to shoal with individuals that resemble them. The oddity effect would thus tend to homogenise shoals.
One puzzling aspect of shoal selection is how a fish can choose to join a shoal of animals similar to themselves, given that it cannot know its own appearance. Experiments with zebrafish have shown that shoal preference is a learned ability, not innate. A zebrafish tends to associate with shoals that resemble shoals in which it was reared, a form of imprinting.
Other open questions of shoaling behaviour include identifying which individuals are responsible for the direction of shoal movement. In the case of migratory movement, most members of a shoal seem to know where they are going.