Like I said, it’s no different than any other entity that cannot print its own money - like a US state. They raise taxes, they issue bonds and try to sell them.
At a certain point, if they can’t keep a positive balance in their central bank, they hit the wall - creditors refuse to buy bonds that may not be paid, other banks refuse to accept their transactions, can’t even get pallets of bills and coins, so their employees and creditors go the the ATM and can’t get cash out, someone selling to Montenegro or its citizens will demand payment via something other than the Montenegro banking system, etc. They then have to reconcile their balance with the world, pay outstanding transactions - again, either taxes, or issuing bonds, or… selling state assets. Cut back on expenses- lay off civil servants, cut salaries, issue proclamation to reduce pensions, worst case seize private assets. (As a sovereign country, they can make these unilateral decisions, and usually get away with it). Sometimes the IMF or such will step in and arrange matters, and tends to require the same austerity. Greece is a good example - does it really matter if a country is in the Euro zone or not, if they use the currency? They just have no input into monetary policy as a non-participant.
However, if the country wants to remain a democracy, it has to watch the central bank balance so it does not come to extreme measures. Greece I suppose was lucky - they borrowed from European banks, many German, and so the bail-out was as much to save the banks as to save Greece. But the crisis was pretty much textbook - they kept borrowing, banks kept lending, until they could no longer afford to pay the bonds due and pay all the internal obligations like subsidies, pensions and wages. (and tax collection was also lax).
The main difference, as they say, is that a country cannot exactly go bankrupt. Instead, it has the arbitrary power to rearrange its internal affairs such that costs should balance and begin to pay off accumulated debt. (After all, you can’t auction off a country at a bankruptcy sale… we hope)