Ideally, you should read some literature on how to properly crate train your dog, as there's much more to it than we can advise you about here. However, we will say that it should be a gradual process. Don't just shut your dog in for the first time and leave him there for several hours, as he’ll likely be scared and can develop an irreversible aversion to the crate. Introduce him to his crate over several days or weeks, letting him scope it out at his own pace, and encourage him inside with treats and toys.