An example
Say you deposit equal values of ETH and a stablecoin. If ETH doubles, arbitrage traders buy ETH from the pool until its price matches the market, so you end up with less ETH and more stablecoin. Your position is worth about 5.7% less than if you had held both tokens outside the pool. The loss becomes permanent when you withdraw at that point.
How to limit it
Pairs of assets that move together, such as two stablecoins or ETH and staked ETH, suffer little impermanent loss. High fee income can offset it, and some newer pool designs reduce it.