The lender you will be using will most likely make you order an appraisal to make sure they are not going to loan you more money than what the house is actually worth. You will normally have to pay out this out of pocket at the time you order the appraisal. Most banks and mortgage companies have a different process on how this is done, so be sure to check with your lender to see how they do it. The cost of an appraisal can anywhere from $300 to $600.
The appraiser will pull comps, which are comparable properties that have sold in the last 6 months, then compare the comps to the subject house you are buying. The appraiser's value will be based on recent sold houses in a close distance of the subject house.
What if the appraisal comes in lower than the agreed upon purchase price
This is never a fun issue to deal with, but it happens frequently in hot markets. If the appraisal comes in low the bank will only do the loan based off the appraised price. For example, you're buying the house for $110,000 and the appraisal comes in at $100,000. The bank will only loan you the 100,000. The problem becomes you agreed to pay the seller 110,000 and the bank will only loan 100,000. What do you do?
There are two things that commonly happen. The seller could lower the purchase price to the appraised price, or you could bring the difference in cash to closing. Keep in mind you would still have to have your down payment and closing cost on top of the money you would have to bring.
A third more unsuccessful method for dealing with the problem would be send a rebuttal to the appraiser and try to get him or her to change the value. Appraisers can make mistakes or rush through reports sometimes, normally by reviewing the appraisal your agent will have a better idea of if it is worth to go through the rebuttal process.