Schooling and shoaling
Schooling behavior. In a school all fishes head in the same direction, there is no leader, and swimming movements tend towards synchronization. Many fishes school at some point in their life history. Even loners school as fry. There are advantages to schooling behavior, not only in the individual's survival, which seems of paramount importance to us, because of our exaggerated sense of self, but also in the survival of the genetic line, which is the more important evolutionary aspect of survival. Schooling reduces an individual's risk of predation; the predator selectively picks off outliers and stragglers. In this way the predator exerts an evolutionary pressure on the schooling instinct itself: individuals that are a mite too casual about schooling just don't live long enough to get to spawn.
The predator exerts a selective pressure as well on the uniformity of the population. In a school, an individual that is slightly different in any way attracts the predator's attention. This is one reason why albino cories and long-fin tetras aren't to be seen in natural environments. In fact the only wild albinos, aside from various cave fishes that have evolved in darkness, tend to be solitary species rather than schooling ones, and are retrieved from turbid waters where their paleness doesn't betray them.
Schooling increases the group's efficiency at finding food. If one member of the school spots a food source, the entire school is alerted to the opportunity. This group feeding strategy is most effective where the food is available in a patchy pattern. The school converges on an isolated feeding opportunity, breaks up in feeding then moves on.
Schooling also increases opportunities for reproduction. As soon as a female becomes ripe, a suitable partner or partners are right at hand. Schooling behavior encourages trio spawning, where a female is paired with two males at a time. This ensures that a higher percentage of eggs are fertilized, and at the same time it dilutes the individual contribution of a particular male: another pressure towards uniformity of the phenotype. Adult schooling behavior perpetuates itself through mass spawning. An individual whose biological rhythm isn't synchronized with the school doesn't get a partner. So you see that the question "Why do neon tetras all look just alike?" has several linked answers. Because possible mutations in individual DNA, represented in eggs and sperm, are swamped by the DNA of the school in mass spawning, any individual genetic drift is just overwhelmed numerically. Because in adult life, predators pick off the oddballs that stand out. As a result of these selective pressures, one neon looks more like another neon than any two Apistogramma of the same species.
To see a school form in the aquarium, you need a couple of dozen fish with no strangers present, in a tank three times as long as the average size of the school, an encouragement to pick small fish. The intra-specific aggression level of true schooling fish is near zero. It's just enough to maintain spacing within the school.
Schooling versus shoaling. A shoal of fishes is a more broadly defined group of social fishes, who travel together without completely losing their individual identity. When food items appear, the shoal breaks up in a scramble competition that remains free of mutually-directed aggression; then it peaceably re-forms.
Tiger Barbs, unlike schooling fishes, have a pecking order, as you know. They don't school, they shoal. Often a shoal is a fright reaction. You don't seriously want them constantly huddling in discomfort for safety. Fishes that shoal include Corydoras (all of one species of course) and many Botia, including Clown Loaches, especially before they are sexually mature. Maturing Botia become loners, even quarrelsome with conspecifics.
