A stack is a linear data structure that follows the Last In-First Out (LIFO) principle, where elements are added and removed from the top. It can be implemented in static (using arrays) or dynamic (using pointers) ways, with two primary operations: push (to add) and pop (to remove). Stack underflow occurs when there are no elements to pop, and overflow happens when the stack is full, preventing further additions.