Llamas are descended from camels. Camels evolved in North America about 45 million years ago, and some of them evolved into llamas while they were still in North America, living in the Rocky Mountains and all across the southern part of North America. Llamas spread from there south into South America about 3 million years ago. During the last Ice Age, about 10,000 years ago, both camels and llamas became extinct in North America, but the llamas in South America survived.
In South America, llamas and their close relatives the vicuņas, guanacos and alpacas mostly lived along the west side of the continent, in the Andes Mountains (mainly modern Bolivia and Peru).
When the second wave of people crossed from North America into South America around 10,000 BC, during the last Ice Age, they may have been following the horses and mammoths they usually hunted. But soon these large animals died out - nobody knows exactly why - and the new South American people began hunting llamas instead.
Baby alpaca (Peru)
People living in the Andes (modern Peru) domesticated (tamed) llamas from guanacos and alpacas from vicuņas about 4000 BC, about the same time that people in Central Asia domesticated horses. Vicuņas and guanacos continued to live in the wild, but there got to be fewer and fewer of them, as with the aurochs and wild horses in Asia. People ate both llamas and alpacas, and also trained them to carry packs along roads between cities. People sacrificed llamas to the gods. Alpacas, on the other hand, were mostly bred for their wool, which people wove into clothing.