Wolf Ancestry
The most widely accepted theory is that dogs are descended from wolves, specifically grey wolves. Through selective breeding over thousands of years, wolves with desirable traits were chosen to reproduce, leading to today's diverse breeds.
Some genetic studies suggest a minor contribution from other canid species like coyotes or jackals, but this is still debated.