Say you have a little country of your own, off on an island someplace. You and a few hundred friends, let's say it is. You have a government — monarchy, republic, whatever; doesn't matter. That government has a treasury, but the treasury has no money in it. Which is fine … so long as you don't actually want your government to do anything. If you just want to be able to say you have a government, knock yourself out; nobody can stop you. But as soon as you want that government to do stuff — like hiring police officers, or raising an army — you need money in your treasury.
The way this works is simple: Your treasury issues bonds. A bond is sort of like a very ritualized type of loan. You sell bonds with the promise to, after a set amount of time, buy them back for more than what you sold them for. So say you could sell a bond for $100, with the promise to buy it back in a year for $110. The difference between how much you promise to buy the bond back for and how much it sells for, expressed as a percentage, is called the interest, and the date on which you promise to buy it back is called the maturity.
Who buys bonds? Who cares? Literally anybody with money can buy these bonds. Maybe those are private citizens in your country, maybe it's your central bank (that's how you create money in your economy in the first place), or maybe it's private citizens or other concerns in other countries. Point is, you offer the bonds for sale, and people agree to buy them. Thus do you get money in your treasury.
Of course, people will only agree to buy your treasury's bonds if they think there's a good chance your treasury will buy them back when it promises to. If there's reason to doubt your treasury's willingness or ability to buy the bonds back, the people who have the money to buy them will demand a higher rate of interest to justify the higher risk.
If there's a lot of reason to doubt your treasury's willingness or ability to pay, potential bond buyers might demand an impossibly high interest rate, making it effectively impossible for you to sell bonds, which in turn means it's effectively impossible for you to fund your government's activities.
When one of those government activities you can no longer fund is redeeming previously issued bonds, you've got yourself a sovereign debt crisis. And when a debt crisis gets really bad, you've got yourself a sovereign default situation.
So your question is what happens in a sovereign default situation? Well, most of the time the answer is that doesn't come up, because people, on the whole, aren't complete idiots. You can see a sovereign default situation coming from a mile away. When confidence in your bonds drops, and the demand price rises as a result, it's clear that you're going to have a problem in the future if you don't take measures to prevent it. So people, as a rule, tend to have plenty of chances to see these things coming and avert them.
But sometimes that doesn't happen. (In the case of Greece, it didn't play out that way because there was a big disconnect between the perceived value of Greek sovereign bonds and their actual value, due to what we could charitably call reporting irregularities. When that disconnect was resolved, the market value of Greek sovereign bonds dropped like a rock practically overnight.) In those cases — where a sovereign default situation occurs anyway — one of two things can happen.
Most of the time, you end up with what's called a controlled default. This includes two parts: a restructuring of the sovereign debt, and a guarantor.
In the broadest terms, sovereign debt restructuring just means rearranging things to reduce the debt burden on the treasury in question. That might mean getting holders of bonds to agree to new terms of repayment, or it might mean somebody buying up a bunch of bonds on the open market and then destroying them, whatever. It's usually very complicated, but the general principle is that the country's sovereign debt obligation is changed to reduce the scope of the problem and increase the chance that the holders of those bonds will get at least some return on their investment.
A guarantor, on the other hand, is some body that injects capital into the treasury to cover bond repayments. In the modern era, that's usually the International Monetary Fund, or IMF. The IMF functions much like an insurance underwriter: Countries pay into the fund as they can, and in return receive the right to draw on the fund if needed. In a sovereign default situation, the IMF will extend loans to the troubled treasury — usually loans with lots of very short strings attached — to guarantee the treasury retains the ability to redeem its outstanding bonds as it recovers from its debt crisis. Having a guarantor is good, because it raises market confidence in your ability and willingness to buy back new bonds, meaning you can get money flowing through your treasury again, which is how you climb out of a debt crisis.
But remember I said that only happens — the thing with the restructuring and the guarantor — most of the time. It's also entirely possible for a government to just say "screw it, we ain't payin'." When that happens — and it's worth remembering that in the modern era it's exceedingly rare — the people who hold those bonds just take it in the shorts. The bonds become absolutely, literally worthless; you're better off burning them to heat your house than you are holding on to them in the hope of future repayment.
Of course, the failure of a government to buy back its bonds doesn't just render those bonds worthless. It renders all future bonds issued by the same treasury worthless. Because once a government exercises its power — and it is a power; nobody can stop it from happening — to nullify its bonds, what's to stop it from using that power again the next time a series of bonds matures? Nothing, is the answer. So once a government has demonstrated its willingness to say "screw you" to investors, faith in that government is ruined forever. Meaning that government can no longer fund its operations, meaning it can no longer do anything, meaning it no longer has any reason to exist, as far as its people are concerned. That's how you end up with things like the fall of the Weimar Republic … which is precisely why today we have this vast infrastructure in place to keep things from getting to that point.