A transaction is a sequence of operations in a program that accesses and potentially modifies data, delineated by 'begin transaction' and 'end transaction' statements. Key properties like atomicity, consistency, isolation, and durability ensure the integrity of database transactions. Transactions can be in various states—active, partially committed, failed, aborted, or committed—each representing its current status during execution.