A transaction is a sequence of operations performed as a single logical unit of work that must either fully complete or fully fail. Transactions ensure data integrity through properties such as atomicity and consistency. They are central to database systems. Example: A bank transfer that debits one account and credits another as a single transaction.