To a user, a transaction is a single change event that either happens or doesn't happen. To system implementers, a transaction is a programming style that allows them to code modules that can participate in distributed computations. To illustrate the concept, let us assume that you want to transfer money from a savings account into a checking account. In this scenario, it is critical that both the accounts are changed from a successful transaction and neither is affected from an unsuccessful one. Although this may sound like a fairly straightforward request, it is hard to make this work in a distributed system without deploying some form of transaction control - computers can fail and messages can be easily lost.
Transactions provide a way to bundle a set of operations into an atomic execution unit.
In short, within any transaction, several independent entities must agree before the deal is done. If any party disagrees, the deal is off and the independent entities are reverted back to their original state by invoking a rollover operation. Transactions are essential for distributed applications. Further, transactions provide modular execution, which complements a component technology's modular programming. A transaction either commits or rollbacks.