The evolution of the dog or the devolution of the wolf, because that was where dogs really came from, wolves! As one way to state it is that a dog is a wolf in plain clothes. Dogs can and do interbreed with wolves, producing fertile offspring, this means that basically they are the same.
Thousands of years ago, primitive man obtained a wolf cub, whether from killing the mother of finding one that had been abandoned will never be known. But that person took care of that small animal, caring for it by providing food and shelter. Wolves, being primarily social of pack animals, keyed on the human as leader, and thus the evolution of wolves to dogs started.
Over time, man spread out and took his new found "companion" with him and the wolf started to change. Inbreeding started as there wasn't sufficient new stock around and man also began to encourage certain traits. Shorter hair in the warmer climates was better and longer legs helped it run faster, hunting breeds evolved. Big dogs were selected as protectors, guardians of the home and hearth, also handy for food when prey was scarce.
Then in the past few thousand years, people started to become "human" and realised the value of pets. These funny and loyal creatures could help care for the children and provide entertainment. Small ones could chase rats and got down rabbit holes. Their sense of smell was much superior and they could easily find hidden animals.
One could select for unusual traits such as shaggy hair or sad eyes. By breeding small males and females, toy or miniatures came into being, noisy and protective, but not big enough to eat an excessive amount of food or harm the babies. Dogs were probably some of the first creatures that we started genetic manipulation of, before we knew what genes were!
The Chinese developed the Pekinese and strange little dogs with virtually no use other than looks started spreading. The Pirate Bartholomew Sharp made his contribution when he noticed the "cocky little Spaniard dogs" and kept one as a pet, paying the crew 40 pounds sterling not to eat it, and thus we have Cocker Spaniels!
And dog breeds evolved, and evolved, and evolved. They continue to evolve. The American Kennel Club recognises over 150 different breeds, from massive Mastiffs to tiny miniature dachshunds. They are all dogs and they all originally evolved from wolves! They are still evolving today.