First let me qualify my response by stating that decisions on where and what to invest cannot be made in an information vacuum (i.e. not by someone on the internet who doesn't know you). That being said, real estate is a very useful tool for the smart investor.
Within the domain of real estate you have two major options available to you;
1. Through accurate market and regional research, you purchase a property with the intent to rent it out and/or to resell the property for a capital gain.
PROS: Using this method provided you have a good credit record you can leverage you money by setting up a mortgage on the property. This method can also be very profitable especially through the rental income.
CONS: Substantial risk especially if you are financiering the investment alone. Unless you have a large amount of assets you run the risk of putting all your eggs in one basket. Wheeling and Dealing in real estate is also very time consuming, not to mention the duties of being a landlord.
TAX: You are right that for most circumstances the government does pilfer (yes, that was intentional) a great deal of your profits. However, if you setup a business and funnel the profits through that type of a vehicle then you can substantially lower the taxable income (especially if you re-invest)
The second method which is more mainstream is the utilization of the investment device referred to as REITs. This will diversify your portfolio with real estate without the need to go out and purchase the physical property yourself. Depending the country REITs pay very little to no tax and the vast majority of their profits and given back to the investor in the form of dividends. If your interested I encourage you to further research the matter.