Open the notes app on your phone and type a sentence. Delete a word by mistake and press undo: the word comes back. Press undo again and the sentence you typed before that comes back too. The app is not searching through your whole writing history. It simply remembers what you did, in order, and hands back the most recent thing first. Your browser's Back button does the same: it takes you to the page you left last, then to the one before that.
Now a stranger situation. You type 3 + 4 × 5 on a calculator and it answers 23, not 35. Or you write a C program and the compiler complains expected ')' on a line you swear is fine. Somewhere inside the machine a small helper is keeping track of what is still waiting: an addition that has to wait until the multiplication beside it is finished, a bracket that has been opened and not yet closed. That helper is the same one that runs your undo button. It is called a stack.
In the last chapter you worked with linked lists, where you can add or remove a node almost anywhere you like. This chapter does the opposite on purpose. A stack takes that freedom away and lets you touch only one end. It sounds like a loss, but the restriction is the whole point: because only the newest thing is ever reachable, the stack always knows what to do next, and a surprising number of problems turn out to need exactly that.