I assume that you are asking about the Mexican-American War, which lasted from 1846 to 1848. This war was significant for two main reasons.
First, it was significant because it led to a major transfer of territory between Mexico and the United States. Mexico lost about half of its territory to the United States and the US, of course, gained a huge amount of land. This would become particularly significant as gold was discovered in California and the gold rush ended up enriching the US and not Mexico.
Second, the war was significant because it helped lead to the Civil War. The North and the South came into conflict with one another over this war because many Northerners felt that the war was being fought as a way to increase the size of the South. They felt that this was a war to expand slavery and the power of the slave states. The argument between the North and the South over the war and over what to do with the lands taken from Mexico helped create even more animosity between the two regions, thus helping to bring on the Civil War.