The reasoning behind crate training is not to confine the dog or heaven FORBID, to punish it. Dogs instinctively do not want to soil their sleeping space, so when they are tucked in their crates, nature tells them not to pee/poop unless they just can't hold it any longer. That's why the schedule hmwe46 outlined is so important. By taking the puppy out of the crate and following the routine, they are given the opportunity to pee/poop outside while not suffering the torture of soiling their beds.
Finally never, EVER scold a dog when it has an accident in the house. Your dog doesn't want to go inside any more than you want it too. She, above all, wants to please you. When I was training Sam (my adorable fur baby at the left), if he piddled on the floor, I'd very nonchalantly clean it up. I can't believe there was a time when people thought that rubbing a dog's nose in it's excrement was a proper training method!!!
Anyway, when I'd take him out and he peed/pooped in the grass, I'd clap, cheer and tell him what a good boy he was. When we got him and were housetraining him, I kept a bag of treats with me and gave him one when he did his business outside. As he began to make the connection that "Oh Boy! When I pee and poop in the grass Mommy is HAPPY!" then I weaned him off the treats and continued the verbal praise. Actually, we STILL tell him he's a good boy when he poops!
He's not peed/pooped in the house since he was 6 months old and he's almost 5 years now.