Slippage is the difference in the market price of an asset and the actual price at which a trader gets to buy or sell that asset.
Slippage in AMM-based DEXs
Slippage in AMMs like Uniswap happens when the traded amount is big enough to substantially change the quantity of assets in the pool reserve (this can happen either in low-liquidity pools or when trading high volumes). Most DEXs show the slippage amount in their frontend when submitting a swap order. Protocols like Curve Finance have implemented different mechanisms to handle token pooling than traditional AMMs, to allow for low-slippage trading between pegged assets like stablecoins or different wrapped version of the same cryptocurrency.
Most DEXs allow the user to choose a slippage tolerance (i.e. the maximum amount of slippage that swap can have). It is recommended to keep the slippage tolerance as low as possible, as bots often take advantage of high slippage tolerant transactions with sandwich attacks.
Slippage in orderbook based DEXs
In orderbook-based DEXs slippage happens when there's not enough liquidity at the market price to cover the trading volume. Usually, the more the trading volume in a certain exchange, the greater the chance that buy/sell orders will be filled at the market price. Protocols like Crema Finance on the Solana blockchain aim to bring concentrated liquidity to orderbook based DEXs (like Serum) automatizing limit order positioning and allowing liquidity providers to earn a yield.