The first step in house training your puppy or dog is to establish a routine. Much like babies, dogs do best on a regular schedule.
Take your dog out regularly to establish a place outside where they are to go the bathroom. House training is all about building a surface preference for the dog, so always take them to the same place or type of surface (grass, mulch, gravel, etc.). Don't leave that surface or small area until they use the bathroom, and then let them go back inside or go for a walk. Reward them with a treat or praise when they use the bathroom outside and avoid them practicing going inside as much as possible by keeping a close eye on them. When teaching puppies, make sure you take them out immediately after sleeping, eating, or playing. Those are the times a puppy is most likely to have an accident. If the dog has an accident inside, do not punish them - if you catch them in the middle of it, calmly stop them and take them outside. If you find the accident after the fact, the dog will not associate their earlier action with the punishment and could instead be afraid of peeing or pooping in front of you in general.
When you're unable to watch your dog/puppy, they should be confined to a crate. Crate training your dog/puppy is the best thing you can do to cut down on accidents in the house, as well as destructive behaviors. We have a section on our website with a "How to" video on crate training. Check it out!