Aggression has many aspects.
1.) Temperament is heritable, meaning it passes down the bloodline from one generation to the next. If a dog's parents are aggressive, or there is a history of aggressive dogs in the bloodline, you have a high likelihood of having a problematic dog.
2.) Behaviour is influenced by both temperament and training. Part of training is socialization. Socialization means exposing the puppy to as many new people and as many new situations and places as possible, before the age of 12 weeks. At that point, a very valuable window slams shut forever. After that point, a dog can no longer be socialized, but instead one is now working on desensitization (teaching the dog that certain things are ok). In socialization, the dog discovers for itself that things (fire hydrants, umbrellas, people in large hats) are ok and are not something to be worried about. In desensitization, you are telling the dog "this is ok" and they must take your word for it. However, this is not as strong as deciding for themselves that fire hydrants are not monsters.
If a dog has genetically poor temperament, it is my feeling that you can never truly over come that. You can train the dog, and socialize it and build a good relationship with the dog, such that the dog trusts you. But there will always be something that is just below the surface, waiting to boil over and you can never be exactly sure what the trigger will be. You must live a life of managing the dog and it's surroudings for the entire life of the dog. This is very exhausting for an owner.
If a dog has a genetically sound temperament, but is poorly socialized or poorly trained, you again can create a real mess which may well never be over-come, and you end up in the same situation as above: you must manage the dogs' environment and encounters for all of its life.
If a dog has a genetically sound temperament, is well socialized and trained and then starts to show aggression, one must start to consider physical problems (chemical imbalances, injuries, lesions in the brain).
One caveat to all of this: a genetically sound temperament is often guessed at, but not truly determinable, in puppies. Many puppies start out seeming to be sweet, but the little signs are there. It takes an experienced eye to find these signs, read them correctly and understand their significance. Thus, no one can give you an
absolute list of what to look for, and how to react to what you see. You need to have a trainer and classes, so that an experienced eye is seeing things and is able to then offer you guidance and specific advice.
In searching online, I found this article and it seems to be well-written, clear and covers most of the bases:
Aggression
In your case, from the minimal information you have given, I would agree with the decision to put the dog down. Such a dog is not happy in life, does not trust and lives a life of fear and anger. That is not a life for any animal to need to live.
I hope this helps some.