There are many types of building inspections and contingency inspections for homes which are traditionally done once a Purchase and Sale offer has been accepted by a seller - General Building, Chimney, Water Quality, Quantity, Air Quality, Zoning, etc, In the purchase and sale offer a buyer will specify the number of business days (often 7-15) to complete the inspections and negotiate any contingency amendments to the offer. It is important to get the inspections completed ASAP to allow time to get results of certain tests (such as Water or Air Quality) so that your agent has time to negotiate adjustments to the offer.
You may also bring in professionals before an offer is submitted -for example - if you suspect a an old snowman type furnace might want to be replaced - you might consult a heating specialist to get an estimate
that you might use to negotiate a better price, or to ask for escrows from the closing to be used for replacement of the system. Inspections are paid for by the purchaser. They are necessary so that home buyers know what they are getting into for possible repair costs before purchasing a home and also can be an eye opener to the fact that you might be getting in over your head and are a way you can get out of an offer should immediate repairs be to much to handle. Time is of the essence.