Stack is a simple Last-In First-Out data structure .. Its like this:

|20|
|30|
|40|
----
To add an element to it, we can only push from top and not insert anywhere we like:
So after pushing 10 into the stack, it looks like:
|10| <-- (Pushed on top)
|20|
|30|
|40|
----
Similarly, as its a LIFO system, Popping the stack removes the top most element.
Thus, 10 would be removed on popping:
|20| --> |10| (Popped out and deleted)
|30|
|40|
----
Stack's best application would be the function call. Recursion takes place in stacks format. (And are thus usually avoided)
Read more