When you deposit tokens in a pool, special Liquidity Provider tokens are issued to you as proof of your staked assets. When you want your tokens back, you must return the LP tokens which will be burnt.