Some dogs have wonderful genetic temperament lines and no matter how much you screw up their development, they come out of it with wonderful personalities. Other dogs may have the best upbringing in the world and yet end up aggressive, again in spite of their owner's best intentions. Even tempered dogs generally produce even tempered pups. Don't accept a pup from parents that are aggressive - even slightly aggressive. Then there is the environmental aspect of aggressive behavior.
Some dogs are aggressive because of improper or poor socialization.
This is one of the easiest ways to get yourself in trouble with a dog. Pups must remain with their littermates and mothers until around 8 weeks of age. Even though the pups may be physically capable of leaving their mothers at a much earlier age, they are not socially prepared. Weaning is not the only indicator of preparedness. The other critical period for pups is between the ages of 2 and 4 months.