Breed Tendencies and Individual Personalities
Dogs are who they are. Some tendencies are normal for all dogs, but are enhanced in certain breeds, or certain traits were selected for when those breeds were being developed. In modern society, dogs are often purchased on impulse for their looks or size, with no regard for what the breed's intended purpose is (or was). But just because dogs are chosen based on their looks doesn't mean they lose the instincts that have been bred in for generations.
Understand the Dog You Have
If you have a terrier or herding dog, he probably barks a lot and loudly. That's the dog you chose. Ideally, you researched the breed thoroughly before you chose it and can accept a certain amount of your dog's natural doggieness. If you didn't research the breed before you chose it, do it now, for a better understanding of your dog's natural tendencies, if nothing else. You are not ever going to train the instincts out of your dog, but you can learn how to manage your dog and modify or channel some of the behavior.
Some breeds have been selectively bred for fighting, often with other dogs. Although some individual dogs in the fighting breeds get along fine with other dogs, many don't, and serious injury or death can result from negligent handling of seriously dog-aggressive dogs. Training can help get control of the dog and teach him an alternate behavior to instigating fights, at least with his owner present, but good management is a big part of living with any dog that has a hard-wired or genetic tendency to fight with other dogs. Owners of dogs that are aggressive to other dogs are smart to work with an experienced trainer to help them modify their dog's behavior.
Do not get in the middle of a dogfight! You could be seriously injured for your trouble, and there's a good chance that you won't stop the fight by getting in the middle of it anyway. You can try throwing water on the dogs, or wedging a broomstick in between them.
Shaping Positive Behavior Patterns
Although you are going to have to live with a certain amount of your dog's normal, if annoying, behavior, you can modify the behavior somewhat and reduce its frequency with good management and training, and by actively pursuing legal outlets for your dog to bark, or dig, or chase, or whatever, with the exception of fighting. Teach your dog to bark on command, and let him bark his head off once or twice a day. Make a digging pit for your terrier. Play fetch or Frisbee or set up a lure course for your high-prey-drive dog.
It's difficult, if not impossible, for most dogs to understand not to do something, particularly when that something is as natural to them as breathing. Managing the triggers that cause your dog to engage in the behaviors you want to limit is an important part of modifying behavior. If your dog goes ballistic at the front window every time he sees a jogger go by, close the drapes, or don't let him have access to that window. You may have to do a little investigation to discover what your dog reacts to so you can limit his access to it while you're training.