Bird flight

How does a flock of birds follow the leader so closely in flight? Sometimes I will see a flock take off, and all the birds will fly together at the same angle, making the same turns and dips at the exact same time. How do they do this?