A trigger is always executed as part of the same transaction within which the triggering statement is being executed. When no exception occurs within the trigger code block, the effects of any triggering command within the trigger are committed only if the transaction containing the triggering statement is committed. Therefore, if the transaction is rolled back, the effect of any DML command in the trigger will also be rolled back.
If an exception occurs within the trigger code block but it is caught and handled in an exception section, the effect of any triggering commands within the trigger is still rolled back. However, the triggering statement itself is not rolled back unless the application forces a rollback of the encapsulating transaction.
If an exception within the trigger code block is not handled, the transaction that encapsulates the trigger is aborted and rolled back. Therefore, the effects of any DML commands within the trigger and the triggering statement are all rolled back.