The design is simple: an issuer takes a dollar, mints a token, and promises to burn the token and return the dollar on request. The peg holds because arbitrageurs can redeem at par whenever the token trades below it, so the honest question is not "is it pegged" but "can I actually redeem, and from whom".
That makes the risk a credit and custody question rather than a cryptographic one. Reserves sit in commercial banks and Treasury bills, so an issuer inherits the solvency of its banks and the liquidity of its holdings. A stablecoin briefly traded near $0.87 in March 2023 when part of its reserve sat at a failed US bank, and recovered only once regulators guaranteed those deposits.
Redemption is also usually wholesale. Retail holders often cannot redeem directly and must sell on a cex or dex instead, which means their exit is only as good as market liquidity at that moment. Read the issuer's stablecoin-attestation and its token-blacklist-function policy before treating any of these as cash.
Related: stablecoin, depeg, stablecoin-attestation, stablecoin-redemption