Fish are social creatures. They mass together as a single group so as to look larger than they are individually, protecting themselves from predators. They move as a single unit, streaming around each other in unison like one giant organism.
When feeding sharks are on the hunt, the army of smaller fish open and close ranks, giving the predator a wide berth. It appears that fish know when they are in danger of attack and send out a group memo accordingly.
Interestingly, if a large leaf falls in the water, the fish treat it like a predator and also run for cover. Like humans, it seems that fish can’t always distinguish between friend and foe.