Form follows function, as the saying goes, and a written standard for each breed describes the appearance of a dog built to perform well at the job it was bred to do. Judges make their choices according to their understanding and interpretation of these standards. Dogs are assessed both standing and on the move, and compete first within their own breed. The breed winners go on to the group (breeds are loosely classified according to their purpose, gun dogs in one group, herding dogs in another, and so on), and at the end of the day the seven group winners vie for Best in Show honours. Best Puppy awards are also offered at breed, group and show level. 
(Description courtesy of Canadian Kennel Club)