What counts as attached. Land is the starting point. Buildings and other structures become part of the real property when they are permanently affixed, and so do fixtures, items that began as personal property and were attached to the land or a building in a way that makes them part of it. The test for a fixture is state law and is applied to the facts, so the useful thing to know is the kind of question it asks. The Treasury regulation for like-kind exchanges is a clear federal example: it treats a structure as permanent based on "the manner in which the distinct asset is affixed," whether it is "designed to be removed or to remain in place," the damage removal would cause, any sign that the attachment is not meant to be indefinite, and the time and expense of moving it. It lists in-ground swimming pools, fences, paved parking and grain silos among permanent structures, and treats a building's interconnected systems for electricity, heat and water as structural parts of it.
Rights as well as things. Real property includes interests in land that you cannot touch. The same regulation lists fee ownership, co-ownership, a leasehold, an option to buy real property, an easement, and stock in a cooperative housing corporation as intangible assets that count as real property for exchange purposes. That last item shows how much the answer depends on the purpose: for most state-law purposes a co-op interest is treated as personal property, because the owner holds shares and a lease rather than land, even though a federal tax rule may count it as real property.
Items that sit on the line. A manufactured home can be personal property, titled under a state certificate much like a vehicle, or converted to real property under state law by affixing it to land the owner holds. The 1031 regulation counts "unsevered natural products of land" as real property, so what grows on land is part of it until it is cut or harvested. A lease is a right to occupy and use someone else's real property for a term. In each case the classification decides which rules apply rather than describing the object.
What the classification decides. Real property is conveyed by deed and its ownership is proved through the public land records of the county where it lies, while most personal property passes by delivery, a bill of sale or a title certificate. Real property is taxed by the local ad valorem property tax. Liens on it are recorded in those same land records. And when an owner dies, real property is administered where it sits, which is why a house in a second state can require a second probate proceeding. Federal tax law adds its own lines: since 2018 a like-kind exchange under section 1031 reaches real property only, and the 1031 regulation says its definitions apply "only for purposes of section 1031," so a building component can be real property there and still be treated differently for depreciation.