This is a set of rules (that I didn't come up with) which are simple, but nonetheless result in organic-looking flocking behavior. I find the simulation pretty captivating to watch; it's one of many examples of something called emergent behavior, where complex patterns arise from simple rules. The Game of Life is another example of this. Anyway, here's all that's really going on:
You can also tweak how strongly each of these three rules influence the boids. I'll add sliders at some point. If you want to see the code, it's accessible here. (Disclaimer: I am not good at writing Javascript.)