Shooting birds in flight (BIF) is one of the more difficult aspects of wildlife photography. I've never been particularly good at it, but occasionally get lucky.
Two situations generally arise - one with a busy background (trees, buildings, etc) or one with a reasonably clear sky. The first situation is significantly more difficult than the second. With a busy background, you have to use spot (or possibly zone - a group of a few spots) focusing and track the bird while keeping the focus spot precisely on the subject. Slower flying birds (herons, vultures, egrets, eagles, etc.) are generally easier, so they are good for practice. Hawks are more difficult, but not nearly as difficult as small birds - unless you have a clear background and a camera with a fast auto-focusing lens.
There is a Martin house near my home on a local pond. In the spring and summer, the Purple Martins are very active around the house in nice weather. Often, there are as many as 15 or 20 birds flying around the house gathering nest building materials. The house is on a tall pole out in the open on the bank of the pond providing a nice clear background above the horizon.
In this situation, I can set my camera on wide area auto-focus (WAF) since I'll be shooting against a clear background - the sky. Using WAF, the camera will focus on anything in the frame creating contrast. Since the bird is the only contrasty thing in the viewfinder, that's what the camera focuses on.
With most BIF shooting, it is best to keep your shutter speed above 1/1200 of a second. This keeps motion blur to a minimum. With small fast flying birds even higher shutter speeds may be necessary. I use aperture priority (I set the aperture and let the shutter speed vary) and set my ISO to 400. This tends to keep my shutter speed above 1/1200 and gives me reasonable control over image sensor noise (graininess in the photos). Lower ISO is usually more desirable, but with my Sony A-77, ISO-400 is a good compromise. My lens (Sony 70-400mm f4-5.6 G2) is very sharp shooting wide open, but even better shooting at f8. Depending on the amount of light available, I adjust my aperture to keep my shutter speed above 1/1200th with f8 being ideal. F8 also provides a little more depth of field (DOF - the depth of the area in focus) than shooting wide open. Also, since the background is brighter than the subject, I set my exposure compensation to a plus 1.3 - 2.0 again, depending on the amount of light available. This tends to get the best exposure on the bird. Finally, it is best to have the sun behind you as much as possible. This places more light on the subject, will require less exposure compensation and make it easier to see the fast moving bird in the viewfinder.
With the setting as described above, I stand within about 20-30 feet from the Martin house, select a focal length somewhere between 100-200mm, pre-focus on the house and wait until a bird(s) are circling. All that is required is to find the bird in the viewfinder and fire away. The camera & lens will generally do the rest. My keeper rate using these setting is in the 50% range. I've also used slower focusing lenses - the Minolta 70-210mm F4 and the Minolta 75-300mm f4.5-5.6. They are slower focusing, but I can still get usable images. However, the keeper rate is lower.
Here's a few Purple Martin photos I took recently using the above techniques. All were shot in RAW format and processed using Adobe Lightroom 5.2. Even adjusting my exposure compensation when shooting, I usually had to increase the exposure on the subject in post processing for the best result.