A stack is a data structure that follows the last-in, first-out (LIFO) principle. Items are added to the top of the stack using a push operation and removed from the top using a pop operation. Stacks can be implemented using either an array or a linked list. With an array, the top index must be tracked, while with a linked list, the top is the first node in the list. Both implementations allow push and pop operations to occur in constant time.