When The United States of America began minting its own coins, they were made of gold and silver. Gold and silver had, and still has, a particular value that is independent of the value stamped on it by the mint. It's value is calculated by weight. The government of the United States guaranteed the purity of the gold and silver in its coins. You could, of course, melt them down and see, but after a while people began to trust the US Mint.
The next step was much more difficult. After the civil war, the United States Government wanted to issue "Silver Certificates" - that is, pieces of paper that promised that if you brought it to Washington DC, the Federal government would give you that equivalent of silver coins. It was a promise to give to the bearer (the person holding the piece of paper), on demand, real silver. That is, real money. These were called "Greenbacks" and they created quite a controversy. Most people wouldn't think of accepting a piece of paper instead of real gold and silver, so it took quite a while to catch on.
When greenbacks caught on, gold and silver didn't have to travel around. The United States government would ensure that there was the correct amount of gold and silver in supply to match the amount promised on the greenbacks. If everybody got up one day and presented a silver certificate to The United States government, there would be enough. But, of course, very few people did that. They learned to trust these little green pieces of paper. If you look at very old dollar bills, you will see "Silver Certificate" on them.
The next step was to disconnect the greenbacks completely from the gold and silver supply. In the 1970s, the "gold standard" was canceled. So now, more money could be printed that there was gold and silver to back it up. And nobody really noticed.
So, American money, and most foreign currencies, aren't really worth anything but the trust we have in each other. Gold and silver coins have been traded for thousands of years. Exchanging pieces of paper, like we do now, has only being going on for about 150 years. So far, it's working - as long as we all believe.