A Stablecoin holds assets of value outside of the XRP Ledger and issues tokens representing the equivalent value on the ledger. This type of issuer is sometimes called a gateway, because currency can move into and out of the XRP Ledger through their service. If the assets that back a token use the same amounts and denomination as the tokens in the ledger, that token can be considered a "stablecoin" because – in theory – the exchange rate between that token and its off-ledger representation should be stable at 1:1.
A stablecoin issuer should offer deposits and withdrawals to exchange the tokens for the actual currency or asset in the world outside the XRP Ledger.
In practice, the XRP Ledger is a computer system that cannot enforce any rules outside of itself, so stablecoins on the XRP Ledger depend on their issuer's integrity. If you can't count on the stablecoin's issuer to redeem your tokens for the real thing on demand, then you shouldn't expect the stablecoin to hold its value. As a user, you should be mindful of who's issuing the tokens: are they reliable, lawful, and solvent? If not, it's probably best not to hold those tokens.
There are five common types of currency token traded on the XRP Ledger.
Fiat-backed stablecoins are based on an existing currency such as EUR, USD, YEN, and so on. They are backed at an exchange rate of 1:1. It is a simple, stable option, but it is more centralized and susceptible to hacking. In the strictest definition of a "stablecoin", only 100% fiat-backed tokens qualify.
Crypto-backed stablecoins are similar to fiat-backed stablecoins, but set aside a certain amount of cryptocurrency as collateral. It's decentralized, doesn't require a custodian or audits and regulation. It's also more volatile, and reliant on the stability of the underlying cryptocurrency.
Commodity-backed stablecoins are based on a fungible asset such as gold, real estate, oil, or electricity. Commodities are relatively stable and liquid, but are centralized and require regular audits to verify their value.
A stablecoin can be backed by financial instruments such as bonds or equity shares.
A non-collateralized token relies on algorithm-generated smart contracts to supply or sell tokens, similar to a central bank's approach to printing and destroying currency. No collateral is required to mint tokens. Value is controlled by supply and demand through algorithms that stabilize the price. Non-collateralized tokens are typically not considered stablecoins, due to their volatility.