The investigation of all aspects of home to confirm it is the right home for you. Due diligence begins with a physical inspection of the property, but it doesn't end there. It also includes a review of title, to identify any encumbrances on the property that might limit or restrict your use. Common examples include easements, such as a shared driveway, or Conditions Covenants and Restrictions (CC&Rs), which may also obligate you to a homeowners' association.
Speaking of which, if there is one, make sure you (a) know what it is responsible for, and (b) its financial health. If the HOA is essentially broke with expenses on the horizon... well, that's probably not an HOA you want to be a member in.
If you're planning on making any significant changes to the property, then you must also confirm that those changes will be allowed. You should consult your land use code of the city, county, state, etc. to confirm.
Due diligence usually happens once a home is under contract, with contingencies to allow for it. However, if there are multiple competing buyers, then you may want to engage in some abbreviated due diligence pre-offer so that you can eliminate your contingencies.
Finally, if done during a contingency, then defects in the property can be used to re-negotiate the contract. For example, a seller may agree to make certain repairs, or maybe the parties agree to reduce the sale price.