Positive reinforcement is the key to success. A common mistake is to punish your dog during training or become angry. This will only cause confusion. You can try to hold your dog's attention with treats and enthusiasm, but know that it is time to end a session when your dog becomes bored or tired. Try to end sessions on a positive note. Eventually, successful training will be achieved with patience and consistency.
Every dog needs to learn to walk on a leash. Besides the fact that most areas have leash laws, there will be times when keeping your dog on a leash is for his own safety. Learn how to introduce your dog or puppy to the leash, then teach him how to walk properly on the leash, even beside you on a bike. A loose leash walk teaches your dog not to pull or lunge when on the leash, making the experience more enjoyable for both you and your dog.
When you have to leave the puppy alone, you’ll need to confine it to a crate. This will prevent the puppy from peeing and pooping all over your home, and will also help teach it control, since it won’t want to soil the crate. However, young puppies need frequent bathroom breaks, so you’ll also need to ask a friend or pet-sitter to stop by and let the puppy out throughout the day until it’s old enough to go for longer stretches without needing to use the bathroom.
If your dog isn’t giving you an obvious signal that they need to go out (like whining at the door) I suggest teaching them to ring a bell when they need to go outside. Some of the other signs dogs give that they need to go out such as pacing around or circling can be easy to miss if they’re in another room, which is why a noise based signal such as ringing a bell can make things easier.
Consistency is crucial. This may mean taking time off work to be there to take the pup outside every 20-30 minutes when they are awake. Crate training will also help the 'penny drop' as it teaches the pup to hold on until taken outside. Then, be sure to stay with the pup in the yard so you are there to reinforce how clever they are when they do go in the right place.
The process is the exactly same for older dogs as it is for puppies; prevent accidents from happening by using baby gates and a crate if possible, create a predictable schedule, learn to recognize your dog’s potty signals, accompany your dog outside and immediately reward for all outdoor elimination, properly clean any accidents and supervise your dog until you’re sure that he understands the rules.