Something I need to add to the above answer,is NOTHING ,goes into the dogs crate with them...meaning,no blankies,no newspapers......no bedding of any type.If you put something in there to absorb the urine,you are defeating the entire purpose of crate training.
Use a crate with only enough room for the puppy to stand and turn around in while your gone and at night. Make the crate a positive experience, with food, treats, and toys inside. While supervised, make sure you let your puppy out very often after it eats and/or drinks and when it wakes from a nap. It may not be able to hold it the entire night (depending on age) so you might want to get up to let it out once or twice during the night. When you see it go potty praise it thoroughly using a certain word (like 'potty') so it makes the connection. Inside if the puppy has an accident and you catch it in the act, make a loud noise and immediately bring it outside and encourage it go out there. Do this every time, and soon enough it will make the connection. Never scold it for poop or pee that you have found, the puppy wont understand that your scolding it for an action in the past and will become confused and fearful over time. Clean any potty you find immediately with more than just carpet cleaner, as the urine smell will still be there for the puppy's better nose and the puppy will feel encouraged to go in the same spot. You can find carpet cleaners specific for getting rid of smelly poo or pee in any pet store. Hope it goes well!