Establish a regular schedule of elimination trips and feedings. This helps you to control the times your dog has to go out and prevent accidents in the house. First thing in the morning (even before you have your coffee) carry the puppy outside. He can then come in and play for an hour. Feed breakfast in the crate and don't let him out again for a half hour. Then carry him back outside for potty. Puppies usually have a bowel movement after each meal so give him time to accomplish it.
Now he can have another indoor playtime for an hour or so. Don't give him free run of the house, use baby gates or close doors to keep him out of rooms he shouldn't go in. Keep him in an area where you can watch him constantly. If you give him too much freedom too soon, chances are, he will make mistakes more often. After playtime, take him outside again then tuck him into his crate for a nap.
Repeat the same procedure throughout the day: Potty outside first thing in the morning, one hour playtime, then potty, meal in crate, again then potty, playtime, then potty, nap, and potty, playtime, meal, etc. The playtimes can be lengthened as the puppy gets older and is more reliable. Eventually the puppy will be letting you know when he needs to go out but remember — if you ignore his request or don't move quickly he'll have an accident!
You can use a modified puppy schedule to train a non-housetrained dog or one that's having housetraining problems. Start from the beginning just like a puppy, use a crate and put them on a schedule.
An older dog can be expected to control itself for longer periods provided you take it outside first thing in the morning, after meals and last thing at night. Until they're reliable, get them outside every three-to-four hours in between those times.
There are other potty training methods that you might want to teach your dog to suit your lifestyle. Want to learn more about them in details and enhance your potty training skills?