In short, missionaries from the Church of the East, going through the so-called "Silk Road" which stretched all the way from Europe to Chang'an (Xi'an), China.
Our first substantial account of the spread of Christianity into Tang dynasty is from the famous "Nestorian Stele" of Xi'an, which was the capital city of Tang Dynasty China. In it, it describes the coming of a Nestorian priest by the name of "Alopen," which is probably a Sinicization of an originally Syriac ("Christian" Aramaic) name. The following is a section from Saeki's translation of the Stele.
"And behold there was a highly virtuous man named Alopen in the kingdom of Ta-chin (likely referring to Eastern Roman provinces or Sasanian Persia) auguring (of the sage, the Emperor), from the azure sky, he decided to carry the true Sutras of the True Way (the "Bible") with him, and observing the course of the winds, he made his course to China through difficulties and perils. Thus in the ninth year of the period named Cheng-kuan (635 CE), he arrived at Chang'an (the capital city of the Tang dynasty = Xi'an). The emperor dispatched his minister, Duke Fang Hsuan Ling, with a guard of honor to the western suburb to meet the visitor and conduct him into the palace. The Sutras were translated in the imperial palace. His majesty investigated "the Way" in his own forbidden apartments, and being deeply convinced of its correctness and truth, he gave special orders for its propagation."
We cannot, of course, take this immediately at face value. After all this stele was erected in the late 8th CE, a full 150 years after the events it purports to describe. Nevertheless, it recounts the entry of "officially-sanctioned" Christianity into China at the beginning of the Tang dynasty. If we believe that the emperor really did take an interest in the Christians from the west, then it suggests that this was not the first time that members of the Church of the East had made contact with China. Already in the early second century, in Edessa, Syria, Bardaisan had mentioned the Seres people, whom some (most?) scholars assume to refer to the Chinese.
In any case, it seems that in the early Tang dynasty, there were at least four monasteries within the orbit of the capital. The stele mentioned above itself was funded by a well-to-do Nestorian priest who was at the same time an imperial official. This suggests a robust Christian population at the time. We should also keep in mind that Christians reaching China. Jews, Manichaeans, and Buddhists were all travelling to and from various parts of the world.
For further resources, see: P. Yoshio Saeki's work on the Nestorian Documents as well as the Stele. The latter is accessible here: https://archive.org/details/nestorianmove00saekuoft see: Moffett's "A History of Christianity in Asia: vol. 1"
Avoid Palmer's "the Jesus Sutras"