as Wayne mentioned, you depreciate the value of your property, excluding the land value, over 27.5 years. You also must capitalize and depreciate any improvements to the property, such as a new roof, landscaping, remodeling, etc as they are incurred. So it is important to keep track of the cost and date of the improvements so your accountant can figure out the amount to depreciate. I use Turbo Tax, which can figure it out for me.
When you sell the property, you must recapture the depreciation for tax purposes to determine the capital gain that you will pay tax on. But it is generally considered better to pay tax at the capital gain rate than at the ordinary income rate had you not taken the depreciation. You also give yourself the option to avoid paying any capital gains by using a 1031 exchange, buying another property and rolling those gains in it, but that's another subject!
Hope that helps you understand it better.