In a 1031 exchange, the replacement property must be "like kind" to the relinquished property. The difference in type, grade, and quality does not matter. Generally, any real estate held for business or investment purposes in the U.S. or U.S. Virgin Islands is considered "like kind." For example, an investor can exchange a commercial property for another, or a residential rental property for a commercial property, and vice versa.
My own personal residence and vacation home are not considered to be of "like kind" to any real estate held for investment or business purposes, and they cannot be used in a 1031 exchange. (There are other tax shelters that apply to the sale of one's personal residences.)
The value of the replacement property must be equal to or greater than the value of the relinquished property to obtain a full deferral. I would have to pay the capital gains taxes on any of the proceeds that weren't reinvested.
The ownership title for the replacement property must be identical to the title for the relinquished property.