The general home inspector will put the home through a number of tests to make sure that all of the homes systems and structures are working properly and will determine things like the age of systems and appliances, the remaining lifespan on systems including the roofing system, HVAC, Water Heater(s) etc.
They also find any structural or mechanical problems with the home like wood rot, erosion, electrical and plumbing issues etc. A good home inspector is critical to this process and your agent will be able to recommend some great ones. In addition to finding the problems with a home, they will also provide the buyer with information on the home that they will need to know as homeowners in order to operate and care for the home, for instance, show you where and how to change the furnace filters in the house or where the main water shut-off is located.
At times the home inspector will recommend that specialists in a certain field evaluate a part of the house and make recommendations on it, for instance if they find a problem with the electrical system or the roof, they may recommend that a licensed contractor in that field evaluate the problem. The home inspector is a generalist and knows a lot about a lot, but they are not necessarily specialists and they are generally not the people that will be able to tell you how to fix the problem and how much it will cost.