Keywords for online research: Impossible Trinity, Currency Crises, and Speculative Attacks. I have only done cursory research.
In this context market speculators tend to attack (bet against) central banks trying to enforce a currency peg or target price floor. The target floor can be broken by the combination of adverse fundamental flows of trade and capital assisted by the self-fulfilling market psychology which keeps driving the currency devaluation via falling bid and ask prices on average. The FX reserves of the central bank are used to force up the bid price and try to shake out the weaker speculators who have a stop loss or pain point when the market moves against their position.
In a simplified model I think of a currency pair as having two nations each with respective aggregate commercial bank and central bank. The FX markets are institutions that cause a continuous currency swap between the respective aggregate commercial banks. The swap is highly dynamic and continuously driven by international trade flows, by international capital flows, and by market speculation. If one country continuously imports more than it exports, such that trade flows are never balanced, I think it represents a continuously growing swap between the two aggregate commercial banks. The central bank has other concerns, to regulate inflation or deflation in domestic markets, and apparently must choose only two out of three: fixed exchange rate, free capital flows, and independent monetary policy. I think the central bank is not in charge of the decision for fixed or floating exchange rate because it is a political choice that is not always delegated to central bankers. Capital controls are usually imposed by governments not central bankers. That leaves monetary policy as the effort to manage domestic inflation or deflation. But interest rate policy influences international demand for currency under capital flows and speculation. Central bank currency swaps seem to be used by central bankers, with the authority of governments, to manage international trade and capital flows counteracting or stabilizing the adverse fundamental and technical forces generated by markets. In other words, I often say to myself, there are no free markets, and to the extent markets are free, when combined with finance relations, they are highly unstable.
Joe