On a centralized exchange, buyers and sellers match through an order book. Most on-chain trading works differently. A liquidity pool holds a reserve of two tokens, and a formula sets the price based on the ratio between them. When you swap, you add to one side and take from the other, and the price shifts along the curve. The people who supplied the two tokens earn a cut of every trade's fee.
The pool is also where a token's tradability lives. If the pool is deep, you can trade in size without moving the price much. If it is thin, a single sell can crater the price. This is why a token with almost no pooled liquidity is fragile no matter how good it looks.
It is also the mechanism behind a rug pull. Whoever controls the pooled funds can, in an unlocked pool, withdraw them and end trading in one transaction. Locked liquidity and a distributed pool are what separate a durable market from a trap.