The confusion arises because the text representation of the output isn't the best way to understand recursion. The number of discs isn't "going up", rather it's hanoi(1)
that continues to run once hanoi(0)
is done.
I've created a modified example at JSBin that prints the output in a (somewhat) prettier way with spaces. Only the "moves" actually do anything, the rest of the lines are just recursive calls to solve smaller sub-problems in order to tackle the entire problem later.
You might also want to have a look at this Java applet that graphically shows how the algorithm works - this might be easier to understand.