Example:
You buy a house on March 1 for $100k. You decide to rent it out. It is rented starting April 1st. When you go to do your taxes, the depreciation will be (assuming straight line over 27.5 years) 100k / 27.5 = 3,636 annual depreciation. But since it's a partial year, you'll only take 9/12 of that amount since it actually was a rental starting April 1st, or 2,727 assuming I worked the calculator right. (Techically, I believe you start when you advertise for rental or are actually renting to someone, which ever is earlier. There is grey here, so as long as it's not unreasonable you're probably fine with either 3/1 or 4/1)
If the property is more than just the rental, ie you're renting out a smaller unit, then you would only depreciate a portion of the overall basis. If it's a duplex and the rental is 50%, then you'd depreciate just 50% of the 100k.
You can deduct the depreciation as an expense on the sch E for rentals. This is nice. However, when you eventually sell the building, you will be taxed on all the depreciation that you took, known as depreciation recapture. This is not nice. The IRS requires that rentals be depreciated, so you don't have an option.
If you have a building that is past its useful life, ie not inhabitable, then you can't depreciate it as a rental, because it can't be a rental. If you buy a building and spend a bunch of money to fix it up, therefore it's not past its useful life anymore, then the purchase price + the money to rehab it (some complexity here) = your basis, and that's the number you'll use to calculate deprecation.
If you do big things that are considered capitalizable, then you can add those to the depreciation schedule and start depreciating those. Things like you built a new garage, completely replaced the roof, etc. Not regular repairs or expected maintenance - this is the bigger stuff that extends or expands the useful life.
Do keep good records.