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.
Any changes that are have been completed by a COMMIT can no longer be reversed by a ROLLBACK.
In normal database operation, the database system performs the required ROLLBACK actions independently. However, ROLLBACK can also be explicitly requested using appropriate SQL statements.
SQL Reference Manual, ROLLBACK Statement
Concepts of the Database System, Logging Data Changes