Nobody really understood why or how this was communicated but it was speculated that some substance must be released that instills fear in others. That substance was adequately called "Schreckstoff" (german for 'fear-stuff'). And, indeed, injecting skin-samples of an injured fish (well, how could he then *not* be injured?) into water, scared the §$%* out of the otherwise relaxed co-fishes.
Up to now the chemistry behind that reaction was unclear.
Suresh Jesuthasan of the National University of Singapore and coworkers have isolated one component (the glycosaminoglycan (GAG) chondroitin) from Zebrafish that turns out to be important as messenger . While the evolutionary advantage of Schreckstoff for the survival of the school is obvious (run!) the fate of the injured fish is sealed when he is left alone - showing that evolution developed the use of this warning-signal on the receiver-side, while the agent is possibly released unvoluntarily and aimlessly by the prey. This is consistent with observations that predators are attracted by the same substance that is triggering fear in others.
In the meantime proponents of a commercial view on science already discuss how this substance can be used to keep unwanted fish away from the farm or to attract others - but it is quite fortunate that you just asked what that has to do with Brad and Angelina. Well, you go and figure out!
(for the faint-hearted readers: Suresh Jesuthasan also researched what mechanisms are involved when that scared bunch of Zebrafish calms down again - envisioning new medication for fear-reduction. Anyone speculating that the military might have a benevolent eye on that type of research?)