For civilization that just dissappeared such as Aztec, where did the people go?
The premise of this question is incorrect, though understandable since it's based on beliefs that are popular in society.
Firstly, the "5000 years of history" is a huge myth that's used to basically mark China as uniquely civilised, or with a longer history than anyone else. In reality, China, while being one of the birthplaces of modern civilisation is not the earliest civilisation. Additionally, this creates a monolithic idea of China: it views China as an unchanging, stable society, when in reality, Chinese culture has changed heavily throughout history, as has its government systems, its ethnicites, the very concept of China, etc. The idea of China in the first place as a multi-ethnic state hasn't been around for very long for example. Thus, its length of history is not unique. Civilisations across Afro-Eurasia can claim similarly long histories, if not longer than China.
Meanwhile, the Aztecs didn't just disappear. The Aztec language, Nahuatl, survived and the descendants of the original Mexica people still speak Nahuatl (though obviously not Classical nahuatl.) The Aztecs lived and survived under the rule of the Spanish Empire, continuing to this day. I believe you're thinking about the Maya when you talk about civilisation collapse, and that's more of the exception rather than the norm to how civilisations develop. Also, a thing to remember is that these "collapses" didn't mean that everybody died and disappeared. While the reasons for decline and the abandonment of cities might be unclear, the idea that the civilisation didn't continue is definitely inaccurate. Hence, the people were still there, in the region. The famous "Mayan Collapse" occurred sometime roughly in the 9th century, but was followed by the rize of Chichen Itza and the Spaniards didn't finish conquering the Mayan civilisation until the conquest of Peten, which happened at the end of the 17th century, over 2 centuries since the Spanish had discovered the New World. I wanted to mention this because people often have this perception of Spanish conquest of the New World being inevitable and fairly rapid; the native civilisations didn't just lie down and instantly surrender, and Spanish conquest over the New World took place over a long period of time and with a lot of struggle and effort. Today, the Mayan language is still spoken (a number of Mayan language*) and similarly, Mayan people still live and celebrate their culture today. Their civilisation hasn't disappeared.
5,000 years ago, what is now China was home to multiple distinct Neolithic material cultures, including the Longshan in the North and the Liangzhu in the South. None had writing or sophisticated metallurgy, both of which are often considered core elements of "civilization." Bronze objects and weapons only become widespread in the central plains with the Erlitou culture, circa 1900 BCE, while writing only becomes well-attested at around 1250 BCE, with the Shang culture of Yinxu. The late Shang inscriptions are the earliest evidence of the use of an ancestral form of the Chinese language- meaning we can't be sure whether or not some or all of the Erlitou or Longshan people spoke Chinese. Those outside of the Yellow River valley almost certainly did not. In short, it's been roughly 5,000 years since the rise of Neolithic cultures across what is now China, but only about 4,000 since the earliest bronze-using cultures and more like 3,000 since the first literate one.
The notion of "5,000 years of civilization" comes from efforts to map China's myths onto the archaeological evidence, including the major Three Dynasties project in mainland China. Many Chinese archeologists identify the Erlitou culture as the "Xia dynasty" said to have preceded the Shang, and the Longshan culture is associated with the "Three Sovereigns and Five Emperors," culture heroes associated with the introduction of fire, agriculture, sericulture, and the like. Based on this chronology, Chinese mythological heroes lived approximately 5,000 years ago and therefore Chinese civilization has "five thousand years of continuity." Needless to say this is an exercise in wishful thinking and national myth-making, with no basis in good historical method. We might as well argue that Western civilization dates back to Theseus or Gilgamesh.
References:
Chang Kwang-chih et al, The Formation Of Chinese Civilization: An Archaeological Perspective
Li Feng, Early China
Sima Qian, Records of the Grand Historian
China can't really be classified as one civilization, as in that Shang Dynasty China isn't more like Tang Dynasty China than Mycaenean Greece was to the Byzantine Empire, for example.
That China is one entity the way we might concieve of Sweden or Morocco is a western conception. The Chinese themselves viewed their state as catholic and ecumenical, in that it encompassed all of what the Chinese defined as civilization. In this way it is much more like our concept of "the West" than of any one country. The Chinese viewed themselves as equals of the Romans (another state encompassing the entirety of what the Romans considered to be civilization, a catholic and ecumenical state).
Taken like that, China has survived about as long as "the West" (~3500 years) no matter how arbitrary the concept is (and Greek is attested earlier than Chinese).