The rule in practice
Both the property you sell (the relinquished property) and the property you buy (the replacement property) must be held for investment or business use. Within that boundary, the categories are wide open. All of these are valid like-kind trades:
Vacant land → an apartment complex
A rental house → a retail center
A farm → a commercial office building
One large property → several smaller ones (or the reverse)
What is not like-kind
Real estate is only like-kind to real estate. Section 1031 is real estate only, which rules out:
Stocks, bonds, partnership interests, or REIT shares
You cannot exchange real estate into securities of any kind.
Your primary residence
It doesn't qualify on either side of the exchange.
Personal property (equipment, vehicles, artwork)
No longer qualifies since the 2017 tax law.
The “held for investment” test
What matters is purpose, not property type: the real estate must be held for appreciation, income, or use in a trade or business.