Every function you call goes on a stack, and the engine works through it top to bottom. When a function returns, it comes off the stack. Understanding this one idea explains most of the strange errors beginners hit, including 'maximum call stack size exceeded'.
In this lesson we trace three small programs by hand and watch the stack grow and shrink.