ROLLBACK ends a transaction by discarding all pending data changes made during the transaction. DML statements like INSERT, UPDATE, and DELETE start or continue a transaction, rather than ending it. ALTER is a DDL statement that implicitly commits, but ROLLBACK is the direct command explicitly designed to end a transaction by undoing changes.