Today the rates are arrived simply on the basis of demand and supply.
Historically rates were pegged to Gold, when all currencies were printed depending on the Gold reserves. So if one country printed 100 units of currency of a 1gm of gold and other country 10 units of currency for 1 gm of gold, the rate would be 1:10.
However In the seventies with shortages of Gold and other reasons, USD became the default standard, so the rate started being pegged to the USD reserves the countries started maintaining.
However later in the early eighties, US backing out, the rate purely started getting pegged to market demand and supply. So for most currencies there was a default rate to begin with and today its changed ...
Incase of USD/EUR, the initial rate was determined by the weighted average of the currencies that it sought to replace. After that its been market supply and demand.
Since most of the trade in international market is US denominated, largest being Oil, each country has created a huge reserves of USD. So technically if China were to bank half its USD denominated treasury bills, the USD would come crashing down, but then China itself would be at disadvantage as its value of USD its holding would become less and it cannot buy the same items. Hence all countries keep hording USD and this means US if they print more money, the value will not come down, because it that happens, all countries holding USD would loose their value of reserve. In essence a country can print as much as currency it wants if all(majority) its debts and trades are denominated in local currencies. This is 100% true for US and hence it can get away by printing money. This is also true to a large extent for Japan as bulk of its Debts are denominated in JPY.