Aias's first line is correct --
Real estate professionals are able to apply any losses (in most cases
due to depreciation) to their entire federal tax obligations, personal
or professional.
The rest can use clarification. The non-professional can deduct up to $25K in real estate loss against ordinary income so long as their adjusted gross income is under $100K. The $25K deduction phases out from AGI of $100K to $150K, where no deduction is allowed, but the losses carry forward. Ultimately, when the property is sold, those losses will offset recaptured depreciation, a phantom gain many property owners see upon selling.
(Added in response to comment)
The 1031 exchange is another real estate friendly bit of the tax code. It allows an investor to sell one building and buy another without paying gains in the sale. Basis, including depreciation taken, are just shifted to the new building. (Note, this is no longer allowed for one's residence. Instead, the exclusion of $250k single or $500k for a couple, was added to the code. This was a benefit both to the elderly folk selling the house to go rent or the younger people who were moving to an area having much lower cost of living).