After the purchase and sale agreement has gone binding (which is a term we use to define the time when all parties have agreed to all terms of the contract, it has been signed by all parties, and delivered to all parties), you are in due diligence. At this stage, you will get the earnest money to the Broker, to hold in their escrow account. You will also set up a home inspection as soon as possible.
The home inspector does exactly that aspect of the home. This will allow us to find out the current condition of the home. Once the report comes back, there will likely be repair-related items that we need to negotiate. This will be something your Real Estate Agent can help you determine.