That is called a murmuration, they orient themselves relative to the nearest 7 birds around them. Interestingly, I read in the paper today that a load of starlings were found dead in Somerset; 100 corpses in a 12' front garden and nobody knows why yet.