If you’re willing to wade through the science, here’s an interesting bit of research. The gist is that, as @Doctor_D says, there is no leader; the flocks behave in a way analogous to neural networks, with each individual’s behavior correlated to the flock as a whole regardless of the scale of the flock. The flock appears to form an emergent collective mind. In other words, as @SeventhSense says, it’s the Tao.
The researchers note that this form of organization enables the flock to respond instantly to predation threats or other environmental stimuli from any quarter, in ways that it couldn’t if there were a “top down” organizational structure.