Welcome to the Ranch, Marcus!
When a function is called, several things happen. Generally, working storage items in machine registers will be saved in memory, a block of new working storage sufficient to hold the subroutine's defined local variables is allocated, and the address of the next instruction following the call instruction is saved in memory.
In older machines, these units of storage had to be manually reserved by the compiler-generated code, but most modern-day CPUs are stack-oriented, so they can easily be allocated in an area called the "stack" (or call stack, program stack,
etc.) as a
unit called a
frame woith a single instruction.
You might want to lookup
stack frame where you'll probably be able to see graphic visualizations of this process.