Towards the end of World War II a conference between representatives of capitalist allied nations took place in Bretton Woods Hotel in New Hampshire. To "assist in the reconstruction and development of territories of members by facilitating the investment of capital for productive purposes, including the restoration of economies destroyed or disrupted by war," the participating nations agreed to a set up a system of exchange rates, The World Bank, and the International Monetary Fund or IMF. The final agreement was signed on July 22 1944 and the World Bank came into existence in 1947.
The exchange rate system called for a fixed exchange rate that would only occasionally be changed. This would keep the values of currency stable in relation to each other and to the US Dollar in particular. In turn the United States obligated itself to maintaining a set relationship between US Dollars and gold in a last remnant of the gold standard. This would be maintained by the exchange of currency through the World Bank.
The trouble was that the change in exchange rates did not keep up with the real market value of currencies; central banks were increasingly unable (or unwilling) to control the relative value of their currencies. The US was the only nation that did not keep reserves of foreign currency in addition to gold, which could have balanced this out. Instead it relied solely upon its gold reserves. This meant that little gold flowed into the United States, but gold did flow out. This resulted in a depletion of the gold reserves of the United States from a high in 1946 of 78% of the world’s reserves ($26 billion dollars worth out of an estimated $33 billion worldwide) to around 20%.
Foreign banks started converting their bond and currency assets to gold in large amounts starting in 1963 when US reserves of gold barely covered foreign liabilities. This became acute as the US came under severe inflationary pressure due to war in Vietnam and President Richard Nixon called a halt to gold convertibility on August 15, 1971 and a final end to the agreement in 1973.
Today currencies are allowed to float relatively freely, though the central banks do intervene to try and maintain the value of their currencies from time to time.