They lived from 400,000 years ago to 40,000 years ago, plus or minus, in an area from Western Europe to Western Asia. They evolved from a common ancestor of both Neanderthals and modern humans.
A few hundred thousand years later, Homo Sapiens, modern humans, spread north out of Africa. There is evidence that modern humans arrived in Neanderthal territory 54,000 years ago. That’s a late arrival to that area by modern humans; they were spreading out north and east out of Africa long before that. Maybe they were dissuaded from advancing further into what is now southern Europe by the well-established population of Neanderthals that was already there. When homo sapiens finally did move into Neanderthal territory, there was no immediate replacement. They lived side by side for at least 14,000 years. That’s not very long in geologic time, but that’s a very long time to be next door neighbors.
Ultimately, Neanderthals dwindled while Homo Sapiens increased. The population of Neanderthals was never very high. In all that time, 350,000 years, it’s thought that their population never exceeded 100,000. Neanderthals are gone now, but as a result of being neighbors for so long with Homo Sapiens, there was some breeding between species. We know this because the entire human genome has been sequenced, and Neanderthal DNA has been recovered from artifacts and sequenced as well. Genetic studies comparing the two show that a small bit of Neanderthal DNA, in the range of 1% or 2%, survives in most Homo Sapiens today. Ironically, add up that tiny bit of Neanderthal DNA in the billions of modern humans alive today, and it calculates to way more Neanderthal DNA in circulation now than there ever was while they were still around as a separate species.