Shoaling is kind of like they're just hanging out, like being with others. Schooling is where they form a pack of sorts and try and mimic each other (ie swimming together). I'm pretty sure that schooling is a way for small fish to appear as a larger fish to scare off predators, where shoaling is more of a social thing.