From the Humane Society of the United States
While there is no way to guarantee that your dog will never bite someone, you can significantly reduce the risk. Here's how:
Spay or neuter your dog. This important procedure will reduce your dog's desire to roam and fight with other dogs, making safe confinement an easier task. Spayed or neutered dogs are three times less likely to bite.
Socialize your dog. Introduce your dog to many different types of people and situations so that he or she is not nervous or frightened under normal social circumstances.
Train your dog. Accompanying your dog to a training class is an excellent way to socialize him and to learn proper training techniques. Training your dog is a family matter. Every member of your household should learn the training techniques and participate in your dog's education. Never send your dog away to be trained; only you can teach your dog how to behave in your home.
Teach your dog appropriate behavior. Don't play aggressive games with your dog such as wrestling, tug-of-war, or "siccing" your dog on another person. Set appropriate limits for your dog's behavior. Don't wait for an accident. The first time he exhibits dangerous behavior toward any person, particularly toward children, seek professional help from your veterinarian, an animal behaviorist, or a qualified dog trainer. Your community animal care and control agency or humane society may also offer helpful services. Dangerous behavior toward other animals may eventually lead to dangerous behavior toward people, and is also a reason to seek professional help.
Be a responsible dog owner. License your dog as required by law, and provide regular veterinary care, including rabies vaccinations. For everyone's safety, don't allow your dog to roam. Make your dog a member of your family: Dogs who spend a great deal of time alone in the backyard or tied on a chain often become dangerous. Dogs who are well-socialized and supervised rarely bite.
Err on the safe side. If you don't know how your dog will react to a new situation, be cautious. If your dog may panic in crowds, leave him at home. If your dog overreacts to visitors or delivery or service personnel, keep him in another room. Work with professionals to help your dog become accustomed to these and other situations. Until you are confident of his behavior, however, avoid stressful settings.