Every function call adds a frame. A recursive function calls itself, stacking frame after frame until the base case. Walk through factorial(4) — watch the frames pile up, then unwind in reverse order as values are returned (LIFO at work).
What if recursion never hits a base case? Frames pile up forever until the OS kills the process with SIGSEGV (default stack limit ~8 MB on Linux).
sub rsp, Nmalloc() / newfree() / delete (or GC)