Behind The Scenes
Heap is a much larger region storing everything allocated dynamically. This separation is useful to make the execution safer from corruption (stack is more protected) and faster (no need for dynamic garbage collection of the stack frames, fast new frame allocation).
The Call Stack
The stack frames are “Last In First Out” or LIFO. As each function is called, it is placed on the top of the call stack to ensure it is executed first. Once all tasks are stacked, they are executed one by one and removed until the stack is clean.