According to the Humane Society of the United States, it takes a few weeks to housebreak a puppy; some breeds take longer than others. Puppies are not physically able to maintain full control of their bladders or bowels until they are about 12 weeks old.
Puppies can typically control their bladders for one hour for every month of their age; that means that a three-month-old puppy can reasonably be expected to control his bladder for three hours. Forcing a puppy to go longer than that means he will have a house training accident. As part of housebreaking, puppies not only need to learn bladder and bowel control, they also need to learn where it is okay to defecate and how to tell their people they need to go outside.