Here's what I know. Some of it might be a little off, but hopefully it will help you understand the IMF a bit more.
The IMF was set up when the world had almost universally pegged exchage rates. The idea was that each country would peg its exchange rate, buying surplus currency and selling when shortages occured. If the central bank ran out of foreign reserves then it could borrow from the IMF in the short run and devalue its currencies exchange rate in the long run.
Up until the mid 90's about half of the wolds countries still ran with fixed exchange rate systems, although in the previous decade many have floated (eg. Argentina, Thailand, Indonesia) whereas a few have maintained them (eg. China, Malaysia, Hong Kong).
Now the IMF lends money more to countries that have trouble raising funds to fund their budget deficits (because the capital markets see them as too risky and will only lend to developed economies in North America, Western Europe and part of East Asia) than to countries that need to prop up their exchange rates.