The origin of the domestic dog is not clear but we know that the closest living relative to the dog is the gray wolf and that the dog is a lower classification of it. Dogs are descended from wolves but they could also have descended from a now extinct species of canid whose closest living relative was the wolf.
A study suggests that the first dogs originated from two different populations of ancient wolves, that are now extinct, and that they might have originated from Eastern Europe, Central Asia and East Asia as this is where the wolf population split. Evidence shows that a wolf population split into two groups, the West Eurasian group and East Eurasian group. These two groups were independently domesticated into two different dog populations around 14,000–6,400 years ago. So this means that the dog was domesticated twice in two different places. "The Western Eurasian dog population was gradually replaced by East Asian dogs, which was introduced by humans at least 6,400 years ago." (Wikipedia)