Shoaling/Schooling is a defensive behaviour. Fish school up if they feel threatened. In a typical crowded aqaurium, this is rarely the case, and true shoaling is not often seen.
The analogy I usually use is put 10 neons in a planted 24" tanks and they'll wander about by themselves, they do not perceive danger. Put the same ten fish in a six foot tank with some open water and they'll stick to each other like glue.
Assuming you have a tank of sufficient size to see schooling at all, then fish of similar types and disposition will school together.
What won't happen is quiet bottom living fish like Golden Barbs, schooling with manic mid to upper level dwellers like Tiger Barbs.