There are generally three most common root causes of dog aggression: trauma, careless breeding and lack of socialization.
Trauma usually includes abuse, neglect, agitation and fear. A dog that has been treated badly when he was a puppy is more likely to be aggressive. That is why it is of enormous importance to meet the previous owners if you are buying or adopting an adult dog.

Another big cause of aggression is careless breeding. This trait is partially heritable and if you are breeding two aggressive dogs, their offspring will most likely exhibit that aggressive trait to a certain level. The best way to avoid having an aggressive dog is buying a puppy that is not aggressive. If you want my advice- when buying a puppy, always ask the breeder to let you meet the puppy’s parents. If he refuses, there must be something wrong with them and you should not be buying a puppy of unknown or suspicious origin. 
The third cause is lack of socialization. I wrote about this subject before and I cannot stress enough the importance of proper and early socialization. A dog that is not socialized is most often a dog that is afraid of everything and everyone.

Fear is a huge factor when it comes to aggression and the first 20 weeks of dog’s life are crucial. During that period, puppy should be exposed to as many as possible new and positive experiences. Those experiences should include meeting and being handled by new people and also interaction with other animals. You also need to expose him to loud or strange noises, take him to places with children, to markets or take him for short car rides, in order to help him cope with new situations without fear. All these actions are necessary if you want to raise well adjusted, non-aggressive dog.

There are also various methods of modifying aggressive behavior. One of them is the so called CAT method, which stands for Constructional Aggression Treatment. It is based on removing the dog from his comfort zone and making him accept the thing (another animal or human) or the situation that he is afraid of, situation that raises his adrenaline or makes him uncomfortable in some way. It is the opposite of keeping aggressive dog in isolation. This way, you are giving him the message “No matter how much you bark and protest, the “enemy” is not leaving. It is going to stay right here in your face, so you better calm down!”. It forces him to accept the situation and realize the thing that is making him fearful is not that bad after all or threatening and the dog starts to accept those circumstances in a calm way. After repeating this treatment for long enough, the dog realizes that the calm reaction, rather than aggressive one, will get him what he wants. After he starts behaving appropriately, the object of focus can be removed.

If you have read articles about socialization of dogs, you realize that this treatment is basically just delayed socialization process. It is teaching an adult dog to cope with new or strange situations. If you had taught him to accept new situations, people and animals while he was still a puppy, you wouldn’t have had to teach him all that now.

When it comes to dogs that are aggressive to other dogs, you can try barricading him and separating him with sliding glass doors from other dogs that are playing outside. That way he can see how much fun other dogs are having together. Latter, when they come inside to drink water, if the aggressive dog starts barking or growling at other dogs, you must correct his behavior and let him know that is a big no-no! If he behaves properly, pet him on the head and let him know that kind of behavior is desirable by saying things like “good boy” or “good girl” and the dog will sense your rewarding attitude.
After the appropriate behavior pattern is established, you can let him play with other dogs, but make sure those are dogs that are well socialized and non-aggressive. That way even if he starts growling or creating drama, other dogs will ignore him and once he realizes he is not threatened in any way, he will calm down.
Like any training, this also takes time, consistence and patience and it doesn’t happen over night, but it is certainly worth the effort.