Cryptocurrencies are generally volatile. There are several reasons for that — low liquidity, speculation, and several other factors. There could be more reasons, but generally speaking, cryptocurrencies have been relatively more volatile compared to fiat currencies.
This volatility does not help with the value transfer use cases of cryptocurrencies. If the price is not stable, the value transferred or committed may not represent the services provided in return. For example, if a buyer and seller agree to transact using a cryptocurrency for a service or product, and by the time it is delivered if the value of that cryptocurrency changes too much then the entire trade could be unfair or undervalued, or overvalued.
To avoid these volatility issues and to still use the features of cryptocurrencies (decentralization, middlemen-less transfers, security, etc.), stablecoins are used.
Stablecoins are cryptocurrencies backed by or pegged to other currencies or commodities that have relatively stable prices. Generally, stablecoins are pegged to fiat currencies (USD, EUR, etc.), precious metals (Gold, etc.), and a combination of other cryptocurrencies.
Stablecoins are of two types — reserve-based and algorithm-based. Reserve-based stablecoins are minted based on the off-chain reserve maintained by the issuer. For example, if an issuer maintains a reserve of X USD in a bank then they can mint the same quantity of USD pegged stable coin on a blockchain. Algorithm-based stablecoins are less popular and work based on an algorithm that mints and burns coins based on the demand and supply, maintaining the stability of the price.
While providing a stable price, stablecoins also provide most of the benefits of cryptocurrencies like secure and trust-less transfers, pseudo-anonymity, etc. Hence, they are preferred as a value transfer mechanism.