How do central banks regulate the money supply to avoid inflation? It is a tricky problem. Historically, poor control money supply led to inflation. Out of control money supply led to hyperinflation. Central banks seem to do a wonderful job in recent years with modern economies seeing low inflation despite quantitative easing.

How do they do it?
The answer provided by Mick is pretty good, but I'll put my own spin on this.

1st: What is inflation?  

Roughly speaking it is when the ratio of money to the things money buys increases.  A bumper food crop can reduce inflation.  Crop failure can increase it.  But certainly the most volatile component of inflation is the supply of money itself.  Economists love to exaggerate the importance of the former (productivity) to cover-up the mess they are making with the latter (money supply).

2nd: What is the supply of money?  

A difficult answer, as money is whatever we accept.  But the most common forms of money however are classified into large aggregates by economists. 


MB: Aka the monetary base in the USA (all money created by the
government...coins, dollar bills, us notes fed deposits)
M1: Bank demand depots (promises of MB) plus cash outside of the banking system
M2: M1 + interest bearing deposits and other checking substitutes


Because private banks can get away with promising more money then they have...and we accept this...then banks actually create money.  And because the higher aggregates like M2 are much larger than MB, it is plain to see that banks are more important variables to the money supply equation and the supply of government money (aka MB).

3rd: How does the Fed regulate the money supply?

It is confusing because the Fed directly dictates the amount of base money in the economy, but also indirectly dictates how much bank money is in an economy.

The primary means by which MB changes include discount loans to banks, buying and selling repos from big banks, and special bailouts.

The primary means by which the Fed controls the supply of bank money is through the open market.  The idea is if the banks have more base money, they will be able to pyramid more deposits on top of that, and vice versa.  To facilitate this the Fed will buy repos from a primary dealer ("special banks") with fabricated money.  The primary dealer than resells the new reserves to lesser banks which then allows them to create more bank money.  

Historically, controlling the supply of bank deposits through a reserve ratio was a technique used (and also capital requirements), but these techniques are not considered fashionable among entrenched interests.   

Has the Fed been doing a good job?

This is a complicated question.  QE did not create massive inflation because the banking sector was in collapse and a large amount of bank deposits had been destroyed (meaning we had less money).  Whether private for-profit interests should have had privileged access to government resources is a very good question.  Certainly the problem of 2008 was created by the banks themselves. Simply put, they made promises to depositors and creditors they couldn't keep.  Banks operate by mismatching short term/low yield debt to long term/high yield debt.  This is a very profitable but risky practice in which banks are not held proportionately responsible when things go wrong.

Classifying inflation is also very tricky because of international trade.  The dollar is a popular currency overseas, so foreigners help sponge up the damage from inflation.  Trade also obfuscates inflation. If you double say the number of dollars, not all prices will increase proportionately.  International commodities can be brought in multiple currencies, whereas local products (like healthcare and college education) can't and can only be purchased with dollars so they increase much more rapidly.  

For a fascinating look at the politics of CPI/inflation, checkout: http://www.shadowstats.com/article/no-438-public-comment-on-inflation-measurement

The most paramount question unasked is if the Fed is seeding the conditions by which another future crisis will happen, to which I fear the answer is yes.