Most lenders will add the appraisal fee to your closing costs. In other cases, you may pay for the appraisal before closing. Sometimes the appraisal fee is folded into the loan and gets paid off over time.
How and when you pay for an appraisal will depend on the type of appraisal performed and how your lender decides to bill you.