For mine, I kept them in a crate whenever I couldn't watch them. Then, start by taking them outside every 30 minutes to an hour, depending on the age/ability of the dog to hold it. For example, I took my puppy out every hour, but to housetrain my older dog, I took her out every three hours because I trusted she could hold it that long. Slowly increase the time between potty breaks, like increasing the time by 30 minutes after three days of no accidents. If you catch them peeing in the house, rush them outside. Always give treats and make a big fuss over them when they go outside.