Be persistent! Make sure the puppy doesn't get the opportunity to pee and poop by using a leash indoors or confining him to a crate when you're out. Depending on the puppies age, pop him outside every 20 - 30 minutes, so there's a greater chance of him toileting outside (by accident at first.) In addition, get rid of any scent markers he's left by peeing or pooping indoors, as these will draw him back to the same spot. This means cleaning the area daily, for 2- 3 weeks after he last pooped there to fully get rid of any lingering odor that the dog can detect.
Unless you plan to keep your dog outdoors--and few of us do because it's not recommended--you'll need to teach your dog where to eliminate. Therefore, house training (also called housebreaking or potty training) is one of the first things you need to work on with your dog. Crate training can be a very helpful part of the training process. This includes house training as well as many other areas of training:
Effective dog training does not require many items, but there are a few basic supplies that will help make the process more convenient and effective. Choose a dog collar or harness that is suitable and comfortable for your dog. Then decide which dog leash is best for training. A retractable leash is not appropriate for dog training. You will also need dog training treats that your dog enjoys and are easy to eat quickly so the reward is more immediate. There are plenty of great treats available at pet stores or you can also use something you make at home, like small pieces of plain cooked chicken or turkey. Can a dog wear a collar and a harness?