Due diligence is the research usually before a purchase to insure that the assets are as expected and properly valued.
In a real estate transaction, due diligence consists of the activities that follow execution of a sales contract and prior to close. The buyer is permited to inspect the property to detect any items that might affect its value. His representatives inspect the title records to see that there are no encumberances.
When a business is acquired, the buyer sends his accountants to look over the books, and people usually visit all of the locations being purchased. They look to see that the properties exist, are properly equipped, and adequately maintained. They inspect inventory of raw materials and product to see that they are present in the quantities specified and worthy of the value assigned. They look into real estate titles, intellectual property, etc, etc. Much of the detail depends on the nature of the business and the assets being transferred.
In a loan, due diligence involves verifying the information provided by the borrower on the loan application as well as appraisal of the property to be mortgaged, and certifications that it meets code requirements and is suitable for residential occupancy.