US taxes its citizens and permanent residences on worldwide income. So if you are a US citizen (or have a green card), you would pay capital gains tax on the gain of the sale of your house in Mexico.
The foreign exclusion mentioned above is for "earned income" - like from a job. As opposed to...