Dog crates provide a perfect venue for helping train a dog in terms of housebreaking and general good behavior and obedience. In addition, your dog will come to enjoy having its own "den" for personal space and security within your home.
Training a Puppy
A puppy should adjust very easily to its crate. Don't leave food and water in the crate but it is a good idea to put toys inside. Make sure to leave the puppy in the dog crate for only reasonable intervals, less than four hours at most, allowing the puppy outside when it needs to go and also the opportunity to romp around.
The dog crate is a secure place for the dog but it should have a good feeling attached to it and this is only possible when the dog doesn't feel the crate is a prison. On the other hand, while training the puppy you can't allow whimpering and crying to deter you from the course of training. Remember that the puppy is not only adjusting to the crate training but also a new home in general and this process will take time.
Training an Older Dog
Older dogs will require a little more finesse when being trained to use their dog crate. Make sure that the dog's first experience with its new crate is a positive one. Start by leaving the door fixed open and coax the dog into its new space. Allow the dog to explore its new "den" on its own while also staying close by to make the dog feel secure. Persuade the dog to lie down and relax. Close the door but remain nearby. Do not respond to crying at this stage. Begin to leave the dog alone in its crate for short intervals (15-30 minutes to start) and increase the times until the dog is completely adjusted.