How does the Monetary base, Narrow money and Broad money affect inflation? In a lot of countries (e.g. Hungary) the M0, M1, M2 and M3 all doubled, tripled or even quadrupled in the past 10 years. How does this directly affect inflation? 

Since just because M2 doubles, it doesn't mean that the Hungarian Forint is worth the half of what it did before. What is the relation between money supplies and consumer price indexes?
The relationship between money supply and price level (inflation is just change in the price level) is as follows:

$$P=\frac{MV}{Y}$$

Where  P the price level, M is the money supply, V velocity of money and Y is the real output. 

So price level is  increasing in money supply and velocity of money, but decreasing in real output. 

If everything else would be held constant price level would actually grow at the same rate as money supply, but in real life of course ceteris paribus condition is not satisfied. Real output continuously changes either due to economic growth or due to the boom/bust cycle, seasonal effects etc. Velocity of money is often though to be more or less constant, but it can change as well and in fact at zero lower bound, in a liquidity trap, changes in velocity can often offset increase in money supply preventing inflation. 

Also, the above monetary formula is bit of an simplification because in more complex models not just the actual changes in these quantities but also expectations of these changes matter.