Summarize:

If your dog is aggressive or even if he bites for no apparent reason, you must get immediate control of him. Use a harness, muzzle, or head halter to prevent him from further biting. Don't let your dog go outside the house without being on a leash and unless he's accompanied by a responsible adult holding the handle. You should never leave a dog that bites alone with children. In fact, your dog shouldn't be around children outside the immediate household until his biting is stopped. Once you've gotten control of your dog, you need to take him to the vet for an exam and behavioral consultation. Your vet may find that the dog is suffering from a medical condition (like brain dysfunction from stroke or old age) or is in pain (from arthritis or an injury). If your vet determines a cause for the grumpiness and biting, treatment may be recommended that can stop the biting. If there's no medical explanation for the biting, ask your veterinarian to determine if the dog may be acting out of fear or because he's defending his belongings. Your vet may be able to recommend an animal behavioral specialist. The specialist can work with your dog to make sure he's properly trained. Working with a professional trainer is especially important if there was a human injury involved, since you most likely will not be able to correct the biting behavior on your own. Make sure the professional you work with has been certified to work with aggressive animals. Look for a Certified Applied Animal Behaviorist (CAAB or ACAAB), a veterinary behaviorist (Dip ACVB) or a Certified Professional Dog Trainer (CPDT) in your area.
Control and supervise your dog. Get your dog checked by the veterinarian. Find a professional trainer for your dog.