Perhaps wolves started down this path simply by eating human scraps. Many generations later, humans might have encouraged wolves to stay nearby actively feeding them. Later still, those wolves may have been welcomed into the human home and eventually bred to encourage certain traits. All of this is thought to have unfolded over thousands of years.
Thirdly, dog breeds. Today, many of the dogs you know, and love are the product of selective breeding between individuals with desirable traits, either physical or behavioural. For instance, around 9,500 years ago, ancient peoples began breeding dogs that were best able to survive and work in the cold. These dogs would become the family of sled dogs—including breeds such as huskies and malamutes—that remain relatively unchanged today.