Most dog trainers agree that if you are unable to monitor and supervise your puppy, (like while at work or asleep), the best solution for her chewing and unhousebroken messes is to put her in a dog crate. Dogs like small, cozy places to sleep, so it's not cruel to crate your puppy at night or if you're gone for a couple hours.
Puppies, though, sometimes need a little extra encouragement to enjoy the crate and to keep quiet while in it.
Make good things happen in the crate. Put special toys that your puppy loves, but can only have while in the crate in there with him. Feed him in his crate (with the door closed) and let him out the minute he's done.
Reward good crate behavior. Put your puppy into the crate, latch the door and leave the room--but don't go far. If she whines, ignore her. Immediately after she's been quiet for five seconds, return to the room, release her from the crate, praise and treat. Eventually lengthen the time she needs to be quiet.
Let him nap in the crate. If your puppy is very young, tire him out, then put him in his crate to nap. When he wakes up, let him out. If you then immediately take him outside to pee (all young puppies need to "go" right after a nap), you'll have two good things to celebrate--pottying outside and sleeping quietly in his crate.
Don't give in. If your older puppy already has a habit of crying and howling while in her crate, you may have to call upon a deep reserve of patience and wait 20 minutes or more until she is quiet and you can let her out. Don't cave in and let her out while she's crying--it will reinforce the "crying gets me out of here" behavior, which is what you're trying to eliminate.