Whether the aggression is towards people or other dogs, there is always an underlying reason for a dog showing aggression.:
Fear, where the dog feels threatened, cannot escape or hide, so has little choice other than attack.
An attack is a survival instinct which is inbred. It could be that a dog is protecting their resources and if feels threatened that something valuable to them is going to be taken away,
Aggression towards people can have implications for you as well as your dog, due to the Dangerous Dogs Act and its affects when enforced. When a dog in your charge chases, barks at or jumps up at a person or child it could lead to a complaint, so always make certain your dog is under control at all times. If your dog injures a person, it could be seized by the police. There is also an automatic presumption that your dog will be destroyed unless you can convince the court the dog is not a danger to the public. You may also have to pay a fine, compensation and costs.
Any dog is capable of aggressive behaviour and to help cure them of this takes time and patience and even then requires a thorough management plan to ensure ongoing safety.
Dog to dog aggression is normally due to a lack of socialisation or dogs being collected too early or too late from the litter. Another reason is breeding. For example if a mother or father of a puppy is known to be aggressive there is a very good chance this could be passed on down to the puppy, or, the mother could pass her aggression on to the puppy as a learned behaviour.
Dogs on leads are more likely to show aggression towards other dogs, so this requires a particular approach to create a calm dog that is manageable in the process.