In everyday life
A trade at a market stall: coins go one way and goods go the other, together. If either side pulls back, both keep what they had, and nobody ends up with only half the trade.
One case
A library’s system lends a book in two writes: record a loan for Mia, then mark the copy “on loan”. At 10:14 the server crashes between the two writes. The loan exists, but the copy still shows as available, and at 10:20 another borrower reserves the book that Mia already has.
A group of changes that the database applies completely or not at all. If one step fails, every step is undone.
Every case
Any action with more than one write can stop in the middle: a crash, a timeout, a bug. Without a transaction you get a state that no correct program would create. With one, the database keeps either the old state or the new state, never a mix of the two. It covers only the writes inside that one database: a card payment or an email handled by another company stays outside it.
The word
Engineers call this
When several changes to one database must happen together, put them in one transaction, so a failure leaves nothing half done.