According to law, it is the buyer's responsibility to inspect a home before deciding to purchase it to make sure that there are no defects or issues that might make them reconsider the deal. This is called caveat emptor and means "let the buyer beware". It can be applied to purchase contracts for home purchases and sales all the way to small cottages on the coast of Nova Scotia. But, you might be wondering what your rights are if you find out after the fact that there is something wrong with your home purchase. Here is some basic info that will help you understand if you might be successful in reversing the deal.
Caveat emptor covers all of the defects that could be found in a standard home inspection. This includes things like leaks in the roof, cracks in the foundation, and issues with the heating system. When you're looking for a home your real estate agent will likely tell you that you should have a full home inspection completed before making an offer of purchase to avoid any surprises with these sorts of things. If you don't have time for an inspection before sending in an offer than you need to add a contingency that the sale is dependent on the completion of a home inspection. (example provided)
There are some defects that can be present in a home that are not going to be seen during standard inspections. If you find that there is an issue with something like the interior brick work than you may be able to get out of your purchase agreement or be compensated for the issue. When there is a problem of this kind within the house it then becomes the responsibility of the seller to prove that they did not have any knowledge of the defect rather than that of the buyer to prove that they did know. A real estate lawyer can help you assess if you have a case when it comes to this type of issue.
The other time when you might have a case in regards to reversing a real estate deal is if you can prove that the buyer or their agent was consciously trying to deceive you and hide an issue with the property. As an agent, the selling realtor needs to disclose any information that they know that might make you want to walk away from the property. The sellers are allowed to try to mask some issues but not others. The key is just to make sure that you're always diligent to check up on any properties that you might want to purchase. This includes construction defects and liens that might be on that real estate. What is a lien? Find information here.