Stacks are data structures that follow LIFO (last in, first out) ordering. Elements can only be added to or removed from one end, called the top. Stacks are used to maintain information between main programs and subroutines. Elements are pushed onto the stack by decrementing the stack pointer and storing the element, and popped off by incrementing the stack pointer after retrieving the element. Operations must check that the stack is not empty before popping or full before pushing to prevent errors.