«Man’s best friend» is a common phrase about domestic dogs, referring to their millennia-long history of close relations, loyalty, and companionship with humans. The first recorded use of a related phrase is by Frederick the Great of Prussia. It was likely popularized by its use in a poem by Ogden Nash and has since become a common colloquialism.
Before the evolution of wolf into dog, it is posited that humans and wolves worked together hunting game. Wolves were the superior tracker but humans were the superior killer; thus wolves would lead humans to the prey and humans would leave some of the meat to the wolves. This working relationship eventually led to the evolution of dogs, though there is controversy as to the exact nature of that transition. Some say wolves evolved naturally into dogs, wherein the wolf that worked best with humans slowly began to assimilate and pass their domesticated genes down. Others say that humans took wolf cubs and raised them to be domesticated. Either way, humans and dogs formed a working relationship.