The best way to know about the defects and problems in a house is to have it inspected by a licensed professional inspector. That inspector will provide you with a report on the condition of all the major components on the house. Once you have that report you can ask the seller to repair the defect, use the defect as a negotiating tool to reduce the price, or just look for another house.
Most states have enacted laws that require the seller to disclose all material defects in a written disclosure. However, that disclosure may not cover all the items you are interested in. If the seller has lied, your only recourse is litigation.
Some homes come with warranties, that guarantee specific items in the home such as the heating/cooling unit, electric work, plumbing, appliances, etc. With these warranties if the buyer has a problem, the remedy, usually money to repair or replace, is already spelled out in a document without the need to file a lawsuit.