They made up two new coins, which were algorithmically tied together so that coin A's value was variable and coin B's value was equal to 1 dollar, and the mechanism to maintain this was that users could convert between A and B coins at whatever ratio maintained the "stable" value for B.
This means that as soon as the hype around the speculative A coin waned, it instantly went into a death-spiral of hyperinflation to maintain B's value.
The "stable coin" was never backed by actual dollars or gold or bonds or equity in a business or anything real. It was an algorithmic peg between two different useless coins made up by the same people.
I'd find a forensic accounting investigation that explains what they did and how it worked quite interesting.
I joke, but realistically, the UK has not gone the way of Terraform of FTX, so ...
Prerequisites: 1.Terra/Luna was "special" because it was a cryptocurrency(Luna) with its own stablecoin(Terra/UST), with the peculiar quirk of the collateral for the stablecoin being the crypto itself(unlike Tether/USDC/whatever else where each stable is backed by USD/treasuries/commercial paper and etc).
2. The 2nd part is that the peg of Terra to dollar is maintained algorithmically, via a pretty simple mechanism: One dollar worth of Luna is always worth 1 Terra(so 1 USD in crypto land). To convert between the 2, you either burn(Luna->Terra) or mint(Terra->Luna). The peg is maintained by arbing: If you see 1 UST = 0.9 USD, you buy the UST, mint 1 dollars worth of Luna and sell it to get 10 cents of profit.
3. Anchor protocol was a lending protocol that offered 20% interest rates. You deposit your UST, Anchor lends it out to people who want to borrow it, life is good. There were other protocols that basically also offered ridiculous rates on UST(remember this is close to peak crypto bull).
What happened: 1.From the above description, the biggest question is: What is the value of LUNA? Sure, it has a value with regards to arbing UST, but what is the value by itself(0, turns out). What ended up happening is that during the bullmarket people wanted both UST and Luna(you want Luna to bet on the ecosystem, and you want Terra to farm the 20% yield). For example, if people are buying UST(to put it into Anchor), UST price goes up. You are then incentivized to buy LUNA, burn it to get 1 UST, and sell UST for above a dollar. As you can see, this is a pretty classic flywheel.
2.The actual blowup: Most people blame Anchor cutting the interest rate. Basically, certain large accounts quickly dumped UST for USDT/USDC(actual stables), and this knocked off the peg. Here, under normal conditions, arbitrageurs would massively buy the discount UST, mint LUNA and sell it. There was one problem: LUNA was also massively falling, so it was impossible to do the arb. As a result, the price kept falling as no one was buying, and as the price of LUNA fell the peg could not be defended.
tl;dr It was a stablecoin that was not backed by any actual assets but by another crypto.