There are various approaches to training an aggressive dog, and most of them are based on some form of reinforcement learning. So, you will need to teach your dog to stop aggressive behaviors through positive reinforcement.  If your dog is a puppy, you can reward him with food treats while doing activities that encourage him to show friendlier behaviors. A simple activity like fetching a ball or a toy can get your dog to play nicely with you. Later, you can introduce some obedience training, like "heel" or "sit" commands to teach him how to obey you.  On the other side, if your pet is an adult, you may need to use a different strategy. For instance, you can start with clicker training, where you would tap a small, soft object (a small bell) whenever your dog does something right and give him rewards (like a treat or food) for every right behavior. Later on, you can teach your dog to walk behind a specific person (called a leader) and do some follow-the-leader exercises to teach him basic obedience skills.