Shoaling and schooling
In biology, any group of fish that stay together for social reasons are shoaling (pronounced /ˈʃoʊlɪŋ/), and if the group is swimming in the same direction in a coordinated manner, they are schooling (pronounced /ˈskuːlɪŋ/).  In common usage, the terms are sometimes used rather loosely.  About one quarter of fish species shoal all their lives, and about one half shoal for part of their lives. 
Fish derive many benefits from shoaling behaviour including defence against predators (through better predator detection and by diluting the chance of individual capture), enhanced
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 recognized).
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 themselves. The oddity effect thus tends to homogenize shoals.
An aggregation of fish is the general term for any collection of fish that have gathered together in some locality. Fish aggregations can be structured or unstructured. An unstructured aggregation might be a group of mixed species and sizes that have gathered randomly near some local resource, such as food or nesting sites.
If, in addition, the aggregation comes together in an interactive, social way, they may be said to be shoaling.  [a] Although shoaling fish can relate to each other in a loose way, with each fish swimming and foraging somewhat independently, they are nonetheless aware of the other members of the group as shown by the way they adjust behaviour such as swimming, so as to remain close to the other fish in the group. Shoaling groups can include fish of disparate sizes and can including mixed-species subgroups.
If the shoal becomes more tightly organised, with the fish synchronising their swimming so they all move at the same speed and in the same direction, then the fish may be said to be schooling.   [b] Schooling fish are usually of the same species and the same age/size. Fish schools move with the individual members precisely spaced from each other. The schools undertake complicated manoeuvres, as though the schools have minds of their own. 
The intricacies of schooling are far from fully understood, especially the swimming and feeding energetics. Many hypotheses to explain the function of schooling have been suggested, such as better orientation,
Fish can be
Shoaling fish can shift into a disciplined and coordinated school, then shift back to an amorphous shoal within seconds. Such shifts are triggered by changes of activity from feeding, resting, travelling or avoiding predators. 
When schooling fish stop to feed, they break ranks and become shoals. Shoals are more vulnerable to predator attack. The shape a shoal or school takes depends on the type of fish and what the fish are doing. Schools that are travelling can form long thin lines, or squares or ovals or amoeboid shapes. Fast moving schools usually form a wedge shape, while shoals that are feeding tend to become circular. 
These sometimes immense gatherings fuel the ocean food web. Most forage fish are
Many species of large predatory fish also school, including many
"Shoaling behaviour is generally described as a trade-off between the anti-predator benefits of living in groups and the costs of increased foraging competition."
 Landa (1998) argues that the cumulative advantages of shoaling, as elaborated below, are strong selective inducements for fish to join shoals.
 Parrish et al. (2002) argue similarly that schooling is a classic example of