For dogs to pass the CGC test they need to be able to be able to hold still and not jump on or move towards a stranger who approaches the owner to talk. They need to be able to be petted, groomed, and checked by a stranger much like a veterinarian or groomer would without jumping up or being fearful or aggressive.
They need to walk on a loose leash, sit, down, stay, and come when called. They need to be able to walk well in a crowd of strangers, around ambulatory devices, other dogs, or children, and around strange novel noises or devices, as well as being left with a stranger for three minutes without panicking, barking, or whining for the owner.
As you can see, this takes training to accomplish. At K-9 Companions our basic Level 1 Obedience Course covers all of this and more.