A comparative market analysis (CMA) compares your home to recently sold, pending, and active listings to estimate a competitive list price. It's a marketing and pricing tool, prepared by an agent, and it's the basis for the listing price. An appraisal is prepared by a state-licensed appraiser using a standardized process, and the lender uses it to decide how much it will finance. The appraiser's value is an independent opinion, not a negotiation.
The practical difference: a CMA is about what the market will bear for a listing; an appraisal is about what the lender will lend against. They usually land near each other, but they can differ, and a low appraisal doesn't always mean a low CMA, or vice versa. This page covers the difference briefly; the two answers linked below go deeper.
FAQ
Q: Does the CMA set the appraisal value?
A: No. The appraiser does their own analysis and is not required to follow the list price.
Q: Who orders each one?
A: The agent prepares a CMA before listing; the lender orders an appraisal as part of the loan process.
Q: What happens if the appraisal comes in low?
A: See the linked appraisal answer for the options.