Among other things, the Fed lends to banks directly overnight at the Discount Rate and also sets the Fed Funds Rate (FFR), which is a target for the rate that they’d like to see banks lending reserves to one another at.
A bank may borrow from the Fed directly at the discount rate, if they’re unable to borrow money elsewhere (typically from other banks) and there’s usually a bit of stigma attached to doing this so they tend to avoid it, where possible (especially in times where banks are a bit suspicious of one another anyway).
The Fed Funds Rate refers to the rates at which banks lend to one another… which naturally are a function of supply and demand. The Fed doesn’t control the FFR directly. Instead it controls these indirectly by injecting more money into the system when the actual rates in the market creep above their target (the additional cash they inject will put increase the monetary base as a whole and thus put downward pressure on the rates that banks lend reserves to one another at, to bring these bank in line with target) or sucking money out of the system when the rates are too low (in which case the contraction in the money supply will put upward pressure on the rates at which banks lend to one another to bring these bank in line with target).
The mechansim that the Fed uses to inject money into the system or take it out has traditionally been the purchase and sale of treasuries. When they purchase treasuries they basically create some extra federal reserves (by way of an entry in their computerized accounts) thus magiking some money into existence. I believe they then transfer control of this money to their primary dealers, who are instructed to use these new funds to purchase treasuries from the open market in what are known as “Open Market Operations”. This has the effect of increasing the quantity of reserves in the system which exerts downward pressure on the rates that banks lend to one another at to bring these in line with the FFR. On the other hand, when the Fed sell treasuries to the market they effectively take reserves out of the system which will exert upward pressure on the interbank lending rates.
The Fed has been given more and more power to meddle with the markets more directly of late though. A dizzying array of schemes has been invented in a Keynesian effort to “kick start” the economy (which most of the folks on this website will no doubt consider rather naieve at best). These include the Term Auction Facility (TAF), Term Securities Lending Facility (TSLF), Primary Dealer Credit Facility (PDCF), Asset Backed Commercial Paper Money Market Mutual Fund Liquidity Facility (AMLF), Commercial Paper Funding Facility (CPFF) and Money Market Investor Funding Facility (MMIFF).
The series of acconyms above are described summarily at http://en.wikipedia.org/wiki/Federal_Reserve_System but the net effect of most of these is to lend directly to institutions that would otherwise not borrow from the Fed directly using the discount window (perhaps because the discount rate was too high for some institutions to pay or perhaps because this facility cannot be used in privacy/confidence and it’s use would draw suspicion from other market players) or would not normally qualify to borrow from the Fed. So basically the Fed can now lend more money, to more people, at cheaper rates.
Additionally the Fed now pays interest on reserves that banks hold. This effectively makes banks less willing to lend their reserves to one another at the prices they previously would have done so at… which exerts upward pressure on the FFR without the Fed actually contracting the money supply (quite to the contrary in fact). If this were to push the interest rates that banks charged one another on reserves up above the FFR then that would be yet another excuse for the Fed to push yet more money into the system. So basically, with a FFR of 1% now they can push more money into the system than they could before the payment of interest on Federal Reserves was introduced. Heck maybe 1% today actually means 0% yesterday… I have no idea what the impact of it is in nominal terms.
It’s rather a convoluted system but effectively the Fed can magic money out of thin air and lend this to people in various ways. The interest that it earns of this completely ficticious money is where it’s revenues come from and 6% of those revenues get paid out to the private owners of the Fed. I believe the remainder gets lumped into the Federal budget in some way (but I’m not too sure about that). In both lending money out (and calling in loans) in various colourful ways the Fed controls, indirectly, the total quantity of money in the system (estimated by M0, M1, M2 and what used to be M3 but which is no longer reported) and thus ultimately controls the rate of inflation (the rate at which the money supply increases in excess of corresponding increases in the supply of goods and services) and therefore the rate at which wealth is transfered from savers to borrowers, with the commercial banks taking their cut.
As one of the primary borrowers, government is no doubt one of the greatest beneficiaries of this system. They have more or less guaranteed that they will always be able to sell their bonds (to the Fed if to no one else) and that the yeild they have to pay on those bonds is less than it would be in the absence of the confiscation of savings. As the intermedieries, the banks stand to gain from this system perhaps even more than government does… and wall street seem, rather ironically, to be cheerleaders of this system as well. Personally I don’t think it’s to their ultimate benefit but that is a much longer and more complex discussion. Ultimately the people that pay for all of these benefits (for this is not free trade and thus not mutually beneficial - this is a one way deal… wealth confiscation and redistribution - pure and simple) are savers and, primarily, that means Mom and Pop (or pretty much anyone with a positive cash balance).