A change in a country's balance of payments can cause fluctuations in the exchange rate between its currency and foreign currencies. The reverse is also true when a fluctuation in relative currency strength can alter the balance of payments. There are two different and interrelated markets at work: the market for all financial transactions on the international market (balance of payments) and the supply and demand for a specific currency (exchange rate).
These conditions only exist under a free or floating exchange rate regime. The balance of payments does not impact the exchange rate in a fixed-rate system because central banks adjust currency flows to offset the international exchange of funds.
The world has not operated under any single rules-based or fixed exchange-rate system since the end of Bretton Woods in the 1970s.
To explain further, suppose a consumer in France wants to purchase goods from an American company. The American company is not likely to accept euros as payment; it wants U.S. dollars. Somehow the French consumer needs to purchase dollars (ostensibly by selling euros in the forex market) and exchange them for the American product. Today, most of these exchanges are automated through an intermediary so that the individual consumer doesn't have to enter the forex market to make an online purchase. After the trade is made, it is recorded in the current account portion of the balance of payments.
The same holds true for investments, loans or other capital flows. American companies normally do not want foreign currencies to finance their operations, thus their expectation for foreign investors to send them dollars. In this scenario, capital flows between countries show up in the capital account portion of the balance of payments.
As more U.S. dollars are demanded to satisfy the needs of foreign investors or consumers, upward pressure is placed on the price of dollars. Put another way, it costs relatively more to exchange for dollars, in terms of foreign currencies.
The exchange rate for dollars may not actually rise if other factors are concurrently pushing down the value of dollars. For example, expansionary monetary policy might increase the supply of dollars.
For further reading, see "Understanding Capital and Financial Accounts in the Balance of Payments."