When you exchange one asset for another - it is treated as two transactions:
-- disposition of the first asset, and
-- purchase of the new asset.
The disposition of the first asset is treated as if you sell that asset at its fair market value. That is a taxable transaction - depending on the basis you have in that asset, type of the asset, and how long you owned that asset - you might recognize a taxable income.
The purchase of a new asset is not a taxable transaction. You might have a tax liability when you sell that asset.
Let me know if you need any help.