Texas used to be a part of Mexico. Foreign settlers were invited in to help develop the land and its resources. By about 1830, American settlers outnumbered Mexican citizens and started taking over and insisting on the special privileges provided in the US which were not acceptable in Mexico such as owning slaves and having US principles for owning land. Tensions grew between the Mexicans and Americans and the Mexicans started asking for military protection.
The tensions between them led to the Americans illegally occupying and claiming the mission station at El Alamo, and the Mexican government attacked. The Americans then invaded the Mexican territory and war broke out. The American's ended up winning the war and now Texas, California, Arizona and New Mexico are a part of America.