My west highland white terrier is aggresive against my friends for example he bit my cousin's leg, tore his jeans and created a wound. Also when he meets another dog even larger than him he will try to attack. To stop him attacking my friends we keep him in the balcony while they are here, was this the right way to act? Also what can i do about him attacking other dogs? Oh and before i forget we have a larger male dog has been terrorizing him since he was a puppy. Could this be the problem
If the dog is already that aggressive, chances are you need a professional dog-trainer.
Without knowing more it is even impossible to say what the reason for the aggression is. For example, it could be based on a hunting-instincts (most Terrier-breeds where bred for solitary hunting!), defending his territory, or even fear and/or panic! Attacking other dogs may be a result of bad socialisation. I don't know the dogs history, but he may even been encouraged to attack by a previous owner.
So, there are many possibilities. Seek out a professional dog-trainer, so you can diagnose the cause for the aggression and then work on it. Diagnosing the cause for aggression is possibly one of the hardest tasks disregard a dog because of all the different possible triggers, but you need to know the root cause before you can help him.
Until then, I would advise you do some basic obedience-training in a place where the dog is comfortable and calm. Use reward-based training here! No matter what the cause of the aggression is, any punishment- or dominance-based training may make the issue harder to deal with. Also, do take your dog for walks - long, tiring walks - but if possible, put a muzzle on him, and avoid other dogs. You can reintroduce to dogs once you know how to work on his aggression.
And above all: have love and patience! For many aggressive dogs, that is what is needed most.
Addendum for the second dog (lot's of speculation, take this with a grain of salt.. or more!):
With the older dogs behaviour, I would suspect fear-based aggression and/or bad socialisation. The older dog should have set limits, yes, but not terrorize. If you cannot reach out for a trainer, I would in this case really start by building a LOT of trust with the younger dog: sit with him (but giving him space), pet him gently if he shows no aggression and/or fear, let him come to YOU for a treat and retreat as he wants. Train "calm and nice" behaviour with the older dog, too, with many rewards and treats.
Try to keep the young one separate from the other dog for now as much as you can. If BOTH are calm, you should be able to let them together, give them both treats. If one of them starts being aggressive, separate them again. Above all: learn to read your dogs language! Barking and growling can mean MANY things, from "play with me" to "back off NOW!". And again, please avoid any punishment-related training, with both of them. It is really hard to say which of your dogs caused the issue here, but I suspect their behaviours may have fed of each other.
Timing in dog-training is tricky, and once accidental rewarding the wrong behaviour is usually more easily fixed than accidentally punishing a desired one, especially in insecure dogs!