Section 1031 of the Internal Revenue Code allows property to be exchanged for other property of "like kind" without triggering immediate capital gains taxation in that tax year. instead, the substitute property as treated as if it had the capital gains tax basis (purchase price adjusted up for capital improvements and down for depreciation) of the previously held property. This is called a "carry over basis".
In practice, 1031 exchanges are done almost entirely with investment real estate, all investment real estate is like kind to all other investment real estate, and the sale of the old real estate and purchase of the new real estate must be close in time but not simultaneous. If the transaction is part trade or part rollover of proceeds, and part cash out for one of the parties, special rules apply that tax capital gains only to the extent of the cash out.
It can't be used for a personal residence, but a trust generally isn't considered to have a personal residence, so pretty much any real estate it owns would qualify.
In this context, if you were selling real estate held as an investment by the trust, you could roll over the proceeds into the purchase of new real estate held as an investment, escaping capital gains taxation at triggered by the sale, if the transactions are close enough together and the proceeds are given to a "qualified intermediary" between the closings of the deals. Once proceeds are with the qualified intermediary, there is one deadline to identify some potential replacement properties, and another deadline to actually close on one or more of them and use the proceeds (at least in part) to purchase them.
The decision is harder for a trust than an individual. An individual can rollover gain in one 1031 exchange after another until death, and at death, if the individual still owns the latest round of real estate at that point all accrued capital gains are made tax free as a result of the "step up in basis to fair market value at death".
In a trust, there is no end game. You pay tax now, or you pay tax later. The virtue of paying tax now is that capital gains tax rates are at historic lows and might not always remain so low (trusts benefit from preferential low capital gains tax rates available for individuals), so paying tax later might leave the trust worse off. But deferring tax has value because it allows you to buy more real estate and get a return on all of the pre-tax dollars reinvested, instead of only the post-tax dollars left after paying capital gains taxes. Over a long period of time, that benefit can be very significant.