During a ROLLBACK, the database system undoes all changes that a transaction executed in the database. To do this, the database system uses the transaction's undo log entries.
The database system then releases all locks that have been allocated to the transaction, implicitly deletes all results tables that have been generated by the transaction, and opens a new transaction.
Note
Any changes that are have been completed by a COMMIT can no longer be reversed by a ROLLBACK.
A ROLLBACK can be explicitly requested using the ROLLBACK statement.
SQL Reference Manual, ROLLBACK Statement
Concepts of the Database System, How Databases Log Data Changes