There are various home inspections you can include in your offer as contingencies.
The most basic inspection that you should *always* have performed is called a "General Home Inspection." These are approximately $200-$400, with the specific price based upon the company you choose to use and the square footage of the home upon which you are putting an offer. Ask your Realtor® for a list of local inspectors. Obviously, you want someone with a lot of experience.
You should work with a general home inspector who is insured and accredited by one or more national/international organizations. The two types of insurance you'll want your inspector to have are general liability (in case they damage something during the inspection) and errors and omission (in case they overlook a major problem in the house that you discover only after owning it). Ask them about both of these coverage types specifically. You can also ask for a certificate of insurance or at least to view their policy for your protection. Be aware, however, that this may be offensive to most inspectors as it makes them feel like you are out to sue them (when you really just want to make sure they are covered). As for accreditation, make sure the inspector is actually certified/accredited and not just a member of the organization.
Accrediting organizations (most sites have a "find a local inspector" feature):