In order for your average dog to exist you need their origin. Many scientists believe that they came from the grey wolf. This means that the wolf is a true survivor and eventually bred off to another species. And because of this, many new dog breeds were created.
Let's use this wolf for instance. He's powerful and large, and it is about mating time. By engaging and becoming comfortable in his environment will help draw a female over to him.
As the female gets closer to the male, another wolf arrives.
This new wolf is instantly attracted to the female and wants to mate with her. The only problem is is that she already has plams to find another.
The female stops focusing on the playing wolf and notices the other. This wolf is not as strong but would still be a good enough partner. In the future, the female wolf and the sneaky wolf will have children and their offsprings will most likely share the traits that they got from their parents from others.
As time continued and the wolf population started to grow, wild dogs were formed. Eventually humans learned how to train them and dogs are now your average house pet.