once your offer has been accepted, you start your inspections and work to get your loan approved. These items need to be completed within the time frame you agreed to in your contract to buy the property. Your agent (the Buyer's Agent) should be helping to coordinate the inspections and keeping in contact with your lender to monitor the progress of your loan approval. Experienced buyer agents will have a list of preferred inspectors that they trust will do the most compentant job.
After the inspections (roof, pest, home chimney and any others you request) have been done, you'll review them with your agent. If need be you'll negotiate any repairs needed on the property with the sellers. Once you are satisfied you'll remove inspection contingencies and similarly you'll remove your loan and appraisal contingencies when your lender has assured you everything is okay on your loan approval.
I hope this was helpful.
Good Hunting for your new home!