Typically, your lender will order an appraisal through a central service. The appraiser will use a traditional “Sales Comparison” approach, where they look at similar homes that have recently sold. They will visit the pending home, compare it to recent sales in a small radius over the last 3-6 months and make adjustments to find a comparable value.
The lender uses the value reported by the appraiser to assess the risk when taking on the loan. If the value is less than the sale price, the seller would need to agree to lower the sale price, or the buyers would have to pay the difference in cash. The lender won’t lend you more than the home is appraised for.
Before you even make an offer, your Realtor can reduce your risk of having the appraised value being less than the purchase price by looking at the sold prices of similarly priced homes. This also ensures that you are paying fair market value for your home.