A stack is nothing but a simple linear data structure that abstracts all of the elements from the user except the last one. Imagine a situation where you have an array or a LinkedList, but you're only allowed to insert an element at the last index or delete only the last element. A linear data structure that can do this is called a stack. A stack can be implemented using any linear data structure, such as an array, vector, or LinkedList.
The following diagram shows a pictorial representation of a stack: