House breaking a dog is all about prevention and positive reinforcement.
Don't wait until he/she has to go so bad they'll go in the house.
When they're still pups, they need to go out:
as soon as they wake up (in the morning or after day time napping),
after eating (about 10 - 15 minutes after)
after playing
before bedtime
When an accident has happened and you were not there to witness it, just clean it up. Do not scold. They don't even know it was theirs once the deed was done and they've moved on.
But when they do anything outside, calmly state what they are doing ("Fido pee - good boy"; or "Fido poop - good boy"), then wait until they are all done, then praise calmly and nicely, but not excitedly or wildly. A small treat is fine, especially when they are very young.
Soon enough you will be able to say "Fido pee" and they will "go" to get your praise and/or reward.
Inside the house: set them up for success. If you cannot be home with them, provide them an area where they can be very comfortable and do no damage. An exercise pen is great for this (available at good pet stores such as Ren's). But also include an area where they can relieve themselves. A pee pad on a boot tray works very well. Put it in a corner so they don't have to walk across it to greet you when you get home.
When you do get home do not make a big fuss. Just calmly say hello and proceed to take the dog outside. (This prevents excited / nervous urination).
Dogs need strong and calm owners. If you are new at this, I highly recommend you watch tons and tons of the Dog Whisperer shows. He, Caesar Milan, solves many dog problems and his techniques will show you how to prevent your dog from developing any issues.