Let me say that fish do not train their young like humans do. Fish lay their eggs and the young fend for themselves. How fish learn to eat lionfish is that there is variation among fish and some fish will be more interested in trying a new meal than others are and those fish that eat the lionfish will have a bigger food source and in turn will reproduce more often and in larger numbers so over time there will be more groupers, snappers and sharks thank recognize the lionfish as a food source and this will keep the lionfish numbers in check.
The same is true of the small fish that recognize the lionfish as a threat. Those that see the lionfish as a predator will survive to breed and pass on those traits to their offspring. Over time most of the fish of the reef will be wary of the lion fish because those that do not will have been eaten and unable to reproduce. This is how fish "learn", those that recognize the lionfish as a danger produce more fish with those traits while those that do not end up being eaten. The next generation of fish will tend to have the traits of the parent fishes that allowed them to evade the lionfish.
The same is true of the small fish that recognize the lionfish as a threat. Those that see the lionfish as a predator will survive to breed and pass on those traits to their offspring. Over time most of the fish of the reef will be wary of the lion fish because those that do not will have been eaten and unable to reproduce. This is how fish "learn", those that recognize the lionfish as a danger produce more fish with those traits while those that do not end up being eaten. The next generation of fish will tend to have the traits of the parent fishes that allowed them to evade the lionfish.