Answer by taking a quote from the following article:

The Huastec  or Teenek (contraction of Te' Inik, "people from here"; also known as Huaxtec, Wastek or Huastecos), are an indigenous people of Mexico, living in the La Huasteca region including the states of Hidalgo, Veracruz, San Luis Potosi and Tamaulipas concentrated along the route of the Panuco River and along the coast of the Gulf of Mexico. There are approximately 66,000 Huastec speakers today, of which two-thirds are in San Luis Potosi and one-third in Veracruz, although their population was probably much higher, as much as half a million, when the Spanish arrived in 1529. The ancient Huastec civilization is one of the pre-Columbian Mesoamerican cultures. Judging from archaeological remains, they are thought to date back to approximately the 10th century BCE, although their most productive period of civilization is usually considered to be the Postclassic era between the fall of Teotihuacan and the rise of the Aztec Empire.

Studies of language change, especially glottochronology (that is, words changing in form or being replaced by borrowed synonyms), have given linguists the tools to estimate the point in time when many pairs of languages diverged from their common ancestral tongue. The procedure depends on the assumption that languages change, in the absence of widespread literacy, at a constant rate.  Of all the languages descended from Proto-Mayan, the proto-Huastecan language was the first to split from Mayan proper. The second split, in the non-Huastecan main branch, was between proto-Yucatecan, now spoken across the Yucatan Peninsula, and the ancestors of all other Maya languages. The only other language, besides Huastec, which arose from proto-Huastecan was Chicomuceltec (also called Cotoque), a language once spoken in Chiapas near Comitan, but now extinct.  Linguists have approximated that the precursor to the language of the Huastecs diverged from the Proto-Mayan language between 2200 and 1200 BCE. Linguist Morris Swadesh posited the later date as the latest possible time for this split to have occurred, and gave the Huastec/Chicomuceltec inik ("man") versus other-Maya winik as a typical contrast. McQuown suggests 1500 BCE, Manrique Castaneda 1800 BCE, and Dahlin 2100 BCE as the most likely dates for the split. Kaufman's proposed date of about 2200 BCE would require two regular phonological (sound) changes that are attested in all Maya languages, "r" changing to "y" and "q" to "k", to have happened independently after the split, in both the Huastec/Chicomuceltec branch and in the branch of all other Mayan languages.  Robertson's work on verb affixes in the Mayan languages implies that the Huastecs were in contact with the proto-Tzeltal branch of Mayan. In Proto-Mayan, absolutives could be marked either by a prefix or a suffix, depending on the presence of a tense/aspect marker. This feature was retained in Q'anjob'al (a Maya language, spoken in the Cuchumatanes mountains of Guatemala), but lost in other branches. (Yucatecan always uses a suffix for absolutives, while K'iche' always uses a prefix.) Huastec appears to have been influenced by proto-Tzeltal, resulting in such innovations as the preposition ta, used with the object of a verb in the third person. If, as seems likely, the Huastec-Maya split occurred around 2000 BCE, the Huastecs probably did not travel far from the Guatemala-Chiapas borderlands until after 1100 BCE, more or less, by which time the proto-Tzeltalans had been established as a separate branch.

what year did they leave?
2200 and 1200 BCE.