Crate training should start a very early age. Like at the breeder and especially when you bring the little puppy home. Normally by then they should have an idea as to what the crate is and why it is there.
A crate is a small confined area used to teach at least a couple of important areas of their future upbringing.
Number 1 is that they are hopefully taught and understand that they do not go to the bathroom where they sleep and teaches them to wait and go outside.
Number 2 and also as important is to keep them out of trouble while no one is home.
Most dogs love their crate and consider it their home or den. They will often go to on their own to hang out or get away from family members.
During the day only try to keep them in there for 2-4 hours if possible.
At night we like to keep them in their crates so we can sleep. But we are nearby in case of any possible distress.
A crate is a house within your house for them.