This is only a little textbox, and I can't see when your eye's glaze over - so I'm not going to try explaining in detail or I'll be here typing all day, and you still won't understand.
Instead, I'll give you a quick overview, and make a suggestion that you really should follow, OK?
Recursion happens when you (directly or indirectly) call a function before you exit the same function. For Factorials, it's obvious:
int fact(int n)
{
if (n <= 1) return 1;
return n * fact(n - 1);
}
Call that and think about how it works:
int f = fact(4);
Fact is called, and n is 4 so it calls fact(3) and when that returns, multiplies it by 4 and returns.
But before it can do the multiply, it enters a new instance of fact with a new value for n (because n is a function parameter, it does not affect the value of n in the calling function).
So now you are executing fact with n as 3, so it calls fact(2) and when that returns, multiplies it by 3 and returns.
But before it can do the multiply, it enters a new instance of fact with a new value for n
Now you are executing fact with n as 2, so it calls fact(1) and when that returns, multiplies it by 2 and returns.
But before it can do the multiply, it enters a new instance of fact with a new value for n
This time, n is 1 so it returns 1, and the previous instance can do it's multiply and returns 2 * 1
So the previous instance can do it's multiply and returns 3 * (2 * 1)
And you are back to the first instance and it can do it's multiply and return 4 * (3 * (2 * 1))
So the final return sets the value of f to 4 * 3 * 2 * 1, or 24 - which is 4!
Your code is doing the same kind of thing but for a b-tree - it goes all the way down the left branch, then follows that with the right branches (and their left branches). Set up a simple tree:
1
/ \
2 3
/ \ \
4 5 6
And run your code through the debugger - note which value the current node holds each time, and you will see that it visits every node, and the order in which it does it.
Think about it, and you'll get the idea!