In general this behavior in fish is considered to be a "sizing up" aggressive display. In schooling fish, it may be how various fish learn there "place" if you will in the heirarchy of the school - who is dominant, and who is not. Some say it may also be part of a mating display, but I am not so confident in this.
In most fish that I have seen it in - such as cichlids or grunts - it is considered an "aggressive" display.