A 1031 exchange is a tax break. You can sell a property held for business or investment purposes and swap it for a new one that you purchase for the same purpose, allowing you to defer capital gains tax on the sale.
Proceeds from the sale must be held in escrow by a third party, then used to buy the new property; you cannot receive them, even temporarily.
The properties being exchanged must be considered like-kind in the eyes of the IRS for capital gains taxes to be deferred.
If used correctly, there is no limit on how frequently you can do 1031 exchanges.
The rules can apply to a former principal residence under very specific conditions.