An autonomous transaction is an independent transaction started by another transaction, the main transaction. Autonomous transactions do SQL operations and commit or Rollback, without committing or rolling back the main transaction. For example, if you write auditing data to a log table, you want to commit the audit data even if the operation you are auditing later fails; if something goes wrong recording the audit data, you do not want the main operation to be rolled back.
For better understanding consider a transaction without Autonomous transaction first:
Both the transactions i.e insert on emp table as well as logs are rolled back. Now consider I attempted to commit transaction on logs table and tried to rollback parent transaction i.e insert on emp.
So I created a trigger with pragma Autonomous_transaction
Record inserted into both the tables emp and logs
There after I rolled back
Here main transaction gets rolled back i.e insert on emp table rolled back
Child transaction is executing independently even if transaction on emp rolled back.