House training (toilet training) a puppy or a dog takes time and patience and, just as with children, every puppy or dog is different and will learn at their own pace.
To make the process of toilet training successful and as efficient as possible, you need to use reward-based positive reinforcement training. The first step is to give your dog plenty of opportunities to go outside. The second is to reward the dog every time (or as often as possible) that they toilet in the place where you want the dog to go to the toilet.
The reward must occur immediately after the event (within a few seconds), not when the dog comes back inside, as the dog will not make an association between going to the toilet in the right spot and the reward unless it is given straight afterwards. The reward can be in the form of praise (a pat on the chest or saying 'good' dog in a pleasant tone of voice), offering a food treat or giving the dog their favourite chew toy.
This system relies on you supervising the dog as much as possible throughout the day so as not to miss the opportunity to reward the dog for the good behaviour. The more often you can do this, the faster the dog will learn. You should also look out for signs showing the dog is about to go to the toilet so you can take them outside and are ready to reward them as soon as they have finished. When dogs are about to go to the toilet they tend to sniff the area, circle and then pause in the spot (though individuals may vary so owners may watch their dog to get an idea of what they do).
Remember to take your puppy or dog to the toilet area first thing in the morning, as dogs will often need to go to the toilet at this time. Take them to the toilet area frequently.
Positive reinforcement also involves ignoring 'unwanted' toileting – i.e. if the dog goes to the toilet in the wrong place it is best to display no reaction. You should clean the area thoroughly with a non-ammonia based cleaning product (these can be found at your local veterinary clinic or animal supplies store) to take away the scent and reduce the likelihood of the dog using the same place again next time.
Old-fashioned responses such as 'rubbing the dog’s nose in it' or administering any form of punishment will not teach the dog anything, in fact it may actually delay the learning process. The dog may instead learn that toileting in front of the owner is inappropriate and this then makes rewarding toileting (when they do go in the right spot) difficult.
It is very important to note that young puppies often do not have full control over their urination until they are a bit older. That is, urination is a developmental process, so very young puppies can make a toileting mistake without being able to prevent or control it.
More detailed information on toilet training is available from the RSPCA World of Animal Welfare website.