A transaction is a set of one or more updates that the dbms guarantees either (1) all of them occur, or (2) none of them occur. The prototypical example is moving money between accounts: if you post money to the debit account, and then the system crashes before you can post to the credit account, you're now out of balance. Transactions also provide a way for the programmer to abort an entire sequence of updates if something goes wrong before the end.
Use them like this:
begin;
update account set balance = balance + transfer where acct_no = 1000;
update account set balance = balance - transfer where acct_no = 1002;
commit;
When the commit statement executes, all the updates are applied. Alternatively, you can say 'rollback' and discard them all.
The latest version of mysql supports transactions, using a different underlying database engine than the traditional mysql database.