Chickens, unfortunately, have many natural predators that travel by air. These predators seek prey during the day (in the case of hawks) as well as during the night (such as owls). Aerial attacks are tough to prevent and birds of prey can decimate a flock over a very short period of time. While these predators can be stopped by a well-made coop, keeping chickens cooped up prevents free ranging. If you want your chickens to be able to free range safely, there are a few preventative measures you can take to lessen attacks although eradicating them entirely is likely impossible short of constant chicken containment.
Having a good rooster who knows and takes his job seriously goes a long way towards keeping the rest of the flock safe. Many roosters will watch over the hens in their flock while they scratch and peck around and sound an alarm if danger appears. Some roosters will even herd the flock away from danger, pushing them into wooded areas or under structures when aerial threats are present. It is also possible that a rooster will try to engage and even scare off hawks and other such birds of prey.
Being able to seek refuge from an aerial attack is essential to survival. Having tree cover and other structures under which your chickens can take cover will inhibit a hawk's ability to swoop down and grab them. When your rooster alerts, the hens can scramble under bushes, picnic tables, or other forms of shelter until the threat has passed. If you do not have places for your chickens to seek refuge, consider building them a covered run. If you created a barrier of wire or netting, that will give them an added line of defense. You could also make this a mobile run, moving it from place to place to allow access to different areas of your property.
Another option is a livestock guardian dog. The most popular breeds of such dogs in the United States are the Great Pyrenees, Anatolian Shepherds, Akbash, and Maremma. All of these dogs are very large and take naturally to protecting their packs, intimidating predators with vocal threats and aggressiveness as needed. While training is necessary for all dogs, these dogs are generally easier to train in the ways of the farm than they are to socialize with unfamiliar humans due to a sometimes aloof, distant nature. They are protective of 'their' people, however, accepting them as part of their charge. From an early age, they bond with their pack and almost preferentially remain with the pack, ensuring their safety through the confrontation and killing of predators as needed.
Regardless of the options you take to protect your chickens, there is one thing you cannot do by law, and that is killing a bird of prey. It is illegal to shoot, kill, or otherwise harm birds of prey, so if that thought enters your head, be sure to dismiss it. Frustrating though it may be to deal with constant losses to your flock, the solution is to beef up your security rather than taking out the aerial threat. It may take more work to keep your chickens safe, but they are worth it. Plus, if repeated attacks on your chickens fail due to barriers or guardian dogs, hawks have no choice but to move on to another, easier food source, leaving your animals alone.