A stack is a reserved area for temporary storage of data/information is the RAM. the stack is defined usually at the highest address of the available RAM using LXI SP, XX99 H instruction . The location where stack is defined nothing, is stored there.
Then the SP is decremented by one and information is stored. This way the contents are stored in reverse order.
The contents are retrieved in the reverse order. That is, the data which is stored at last is retrieved first of all. The stack works on the principle of LIFO(Last in first out).
The contents are stored on stack using PUSH and retrieved using POP instruction.