A unit of work the database treats as one
A transaction is a sequence of statements the database treats as a single all-or-nothing unit. Either every statement commits, or none of them do. That is the four-letter promise of ACID, made concrete: BEGIN opens the transaction, COMMIT makes its effects permanent, ROLLBACK throws everything away as if it never happened.
The autocommit default
Without BEGIN, every statement runs in its own implicit transaction (autocommit). For single-statement work this is fine. For anything that touches more than one row across more than one statement and needs the changes to land together, you must wrap them in BEGIN ... COMMIT.
Savepoints — transactions inside transactions
A savepoint is a marker inside an open transaction you can roll back to without losing earlier work. Useful for long batch jobs where one failure shouldn't undo everything that succeeded so far.