A crate offers your dog a sense of security and a place to hide and relax. Training him to use the crate is a time-consuming process, but once your dog is trained, he will use the crate when directed and when he wants to get away from the world.
Show your dog the crate. Let him explore the crate and the area around it as he wishes. Put fluffy bedding inside with a few toys to show your dog that the crate is not a scary monster. Place treats inside so the dog knows that good things come when he goes inside.
Put the dog in the crate with the door closed. Sit close by and talk to your dog so he knows that you have not abandoned him. Give him treats and lots of praise so he understands that the crate is a happy place.
Leave your dog alone in the crate for a short period of time and leave the room. It's best to stay in the next room so you can be close by in case your dog needs you. Once he learns that the crate is OK and you will come back, extend the period of time that he is alone.