The stack is a region of data memory that is set aside by the programmer specifically for the main purpose of storing the microprocessor’s state information when it branches to a subroutine. A stack is a last-in, first-out memory structure.
The stack segment is used for managing:
local variables
function arguments
control information such as return addresses.
Stack Pointer stores the address of the last element added to the stack.