The main issue as I understand it, was that when Santa Anna (Gen. Antonio Lopez de Santa Anna) came to power, one of the things he did in 1835 was abolish the Mexican Constitution of 1824. Prior to this, the Mexican government had actively solicited American settlers through generous land grants in Texas.
The Texan settlers were on the verge of revolt after this, and when Santa Anna sent Gen. Cos and 500 men to Texas by sea as a show of force to quell any potential revolt, the Texans were primed and ready.
In October, the actual revolt began, with the Battle of Gonzales (“Come and Take It”) and the Battle of Goliad, which drove the Mexican Army from one of its two main garrisons in Texas (Goliad & Bexar/Alamo). The Texans then besiged Bexar (full name Presidio San Antonio de Bexar, today’s San Antonio), which was the largest city in Texas and the site of the Mexican garrison in the Alamo Mission. The Mexican garrison surrendered in early December after holing up in the Alamo mission for some time prior.
Santa Anna then sent a much larger army (~6000 men) over land to Texas to crush the revolt, and the first place they headed was Bexar, which was hastily fortified by the small Texan garrison under William B. Travis that had remained after the Texans drove out the Mexican army a few months earlier.
Militarily, the battle wasn’t terribly important, but the Texans did extract their pound of flesh, causing around 600 casualties among the Mexican attackers, which was 1/3 of the final assault force of 1800 men, and a 3:1 casualty ratio. A costly victory by any standard.
In a larger sense, the battle bought time for two things to happen - it gave the Texas government time to coalesce into a real government, and for Gen. Houston to gather his forces and retreat (“the Runaway Scrape”) until he could fight a battle of his own choosing at San Jacinto, where he caught Santa Anna’s army unprepared and fought a ludicrously lopsided battle*, captured Santa Anna and secured Texas’ independence.
- At San Jacinto, 910 men of the Republic of Texas army caught 1600 men of the Mexican Army under Santa Anna unawares, and in a 18 minute battle, killed 650, wounded 200 and captured 300, including Santa Anna, while only losing 11 killed and 30 wounded.