In the United States unlike many other countries non-citizens can purchase real estate in most locations.
Foreign Investment in Real Property Tax Act does impact you when you sell and this can have significant consequences. Title companies or others facilitating the sale or transfer of your property may need to withhold and remit to the IRS a certain amount of the proceeds. I've seen numbers of 10-35%. This is not of the profit, but of the gross amount. Then it is up to your CPA to file the appropriate tax forms and declare any taxes or refunds due. This is significant as even if you sell at a loss, the title company might withhold 10% or more of your proceeds to send to the IRS.