An order book waits for someone to say “I will sell this much at that price.” An AMM does not wait. It holds a pile of both assets and uses a rule, often “keep the product of the two amounts steady,” to name a price for the next swap. A big swap moves the price more than a small one. That slip is the cost of trading against a pool instead of a patient seller.
People who deposit both assets are liquidity providers. They earn a slice of trading fees and they also take the risk that the mix of assets in the pool changes. If one asset crashes, the pool sells the good one and fills up with the bad one. That is not a bug in the formula. It is the formula doing its job.
Real example: the XRP Ledger has a built-in AMM. A pool pairs two assets, charges a trading fee set by a vote of the pool, and lets anyone swap or deposit if they meet the ledger rules. The ledger does the math. It does not promise the price you hoped for. Source: Automated Market Makers.