How do countries create their own currencies (and give them meaningful value)? Regardless of why they'd do it, what do countries do to make their own currency, replacing the old one, and give their new one value?

I sorta get how it works, but this kind of economics is still super confusing to me; thus I thought I'd ask. You know, I get the ideas of supply and demand and what-not, but beyond that I'm at a general loss.

Example, if the Ryukyu islands had an uprising and separated from Japan to form their own nation, what could they do to make their own currency? To replace their Japanese Yen? Again, regardless of why they'd want to.
Money is something which has value because everyone believes it has value. 

A good way to create a trustworthy currency is to create a representative currency. A representative currency is a currency which is backed by some rare commodity by always guaranteeing that it can be exchanged back into that commodity. For example, a state might decide to create a new currency, let's call it the TirousCoin, and back it with gold. They decide that one TirousCoin is worth one gram of gold. The state guarantees that when you give them 100 gram of gold, you get 100 TirousCoins from them. And when you give the state 100 TirousCoins, you get 100 gram of gold. That means the TirousCoin's value is bound to the world market price of gold. Giving someone 10 TirousCoins is as if you would give them 10 gram of gold which is as if you give them 442 USD.

But many countries go a step further and have currencies which are pure fiat money. Fiat money is money which is not backed by any commodity. It is simply printed by a central bank, lent to regular banks and from there lent to people. And people trust that central bank to not lend too much of it, because that would cause inflation.

But how do you get people to accept your TirousCoins as their tender for their every day business transactions instead of competing currencies issued by other states?


Declare it legal tender by law. This means that you decree by law that  the TirousCoin is valid payment for all debts. When someone thinks that someone owes them, they can ask the state to force their debtor to compensate them with money. They do that by bringing the case to the state's civil court system. But the court system will consider a debt settled if it is paid in TirousCoins. When a creditor rejects the debtor's TirousCoins and demand to be paid in some other currency, the state will consider the case closed and won't assist the creditor.
Have the state do all their financial business in TirousCoins. Pay government employees in TirousCoins, demand that taxes are paid in TirousCoins (including taxes on transactions in foreign currency), pay subsidiaries and welfare in TirousCoins and demand fines in TirousCoins. When people need to acquire TirousCoins to avoid going to prison for tax evasion, the coins gain real value.
Make sure TirousCoins are a stable currency. Many states in financial perils make the mistake of paying their bills in freshly printed fiat currency instead of playing fair and only spend what they receive in form of taxes. This leads to an inflation which destroy trust in the currency and leads people to do dealings in other currencies.


For further watching, I recommend the Extra History's series on the history of paper money.