Dogs are natural carnivores, and have a tendency to chase things which move away from them. This includes people, cars, and other animals. While this may be normal, it can be dangerous, especially when they are chasing people or cars. Training your dog not to chase things is very important, and you want to start this training as soon as possible.
If your puppy is a breed which will get big, you will want to get started while they're puppies. Many people who are chased by a large dog will become afraid, and will do whatever it takes to protect themselves. If your dog should attack someone, you could be sued or prosecuted. This is a situation you don't want to find yourself in. This is why it is important to train your dog while it is still a puppy. Some dogs can be trained easily, while others are more challenging. Breeds which have traditionally been used for hunting are the most difficult to deal with.
Until your dog is trained, you should never allow him off the leash. Doing this can put the dog and others in danger. Before taking your dog to a place where he will be likely to chase someone, begin by training him in a secure place like a yard which is surrounded by a fence. The dog should be focused on you, and anything which will distract him should be removed. You will need to repeat the steps so that the dog understands what you want. You will want to start by putting the dog on a leash.
You will now want to stand with the dog at the end of a hallway or room. Take a ball and hold it in front of the dog without allowing him to make contact with it. After this, take the ball and roll it towards the opposite end of the room or hallway. Use the word "off" to tell the dog not to chase the ball. If the dog gets up and tries to chase the ball, gently pull him back with the leash and say "off" again. Repeat this step until the dog doesn't chase the ball when you roll it. When he does this correctly, reward him with a treat.
Repeat this technique in different rooms of the house. As your dog continues to improve, take him off the leash, but keep him indoors. Once he has shown that he can do this indoors, take him outside and start the whole process over again.