Where do dogs come from? What is their relationship to wolves?

Where do Homo sapiens come from? What is our relationship to other human species such as Neanderthals, Denisovans and Homo erectus?

Why do dogs flourish as wolves struggle to survive? Why are we the only remaining humans?