Real estate has historically been a good investment. This is because it can provide cash flow (in the case of rental income property) and appreciation. While some will correctly point out that homes after 2008 declined in value (some by a great deal), most areas have recovered and have returned to pre-crash values.
To your question: before investing in rental properties, you should have an excellent idea of what your expectations are. This includes the cash flow (which could be negative at times). Here is how you might go about doing that analysis.