if you rent it for more than 3 years before the sale, you'll lose out on the home sale exclusion. in addition, depreciation allowed or allowable is taxed first at a maximum of 25%(as of now) before the rest of the gain is taxed at whatever capital gain rate you are in. there would also be state taxes if the state has an income tax. you can avoid taxes on the gain by doing a 1031 exchange if that code section is still in effect when you sell.
While I can see you are attempting to educate yourself on rental property stuff, this public forum is probably not the place to do it. Your query is so generic and would requiring writing a novel sized book to cover everything possible. Just the tax portion alone could constitute volume one. Fortunately, that volume has already been written by the IRS as IRS Publication 527 at https://www.irs.gov/pub/irs-pdf/p527.pdf That publication covers all possible scenarios. You'll have to pick out the information that applies to your specific scenario.