It's really not very complicated.
In the multi-step income statement, firms have a line called income tax expense. While this is a number for financial accounting and reporting purposes (GAAP, IFRS), everyone knows that the actual tax you pay is based on IRS rules (Form 1120 for corporations, Form 1065 for partnerships and most LLCs (except for those that are disregarded entities and check the box to elect to be treated as sole proprietorships), and Form 1040, Schedule C for sole proprietorships.
Now, if you have to pay taxes based on the IRS rules, but your books use GAAP, how do you figure out your income tax expense???
Simple. Convert your financial income to taxable income by making the various modifications that caused the differences in the first place. This is called an M-1 reconciliation, and there are various modifications. For example, if there was rent received in advance, you would need to add this to taxable income, because GAAP told you not to recognize the income until it is earned ratably, but the IRS told you to recognize all the income currently. Another example is municipal bond interest income. Since this is considered income for book purposes but is tax-free, we would need to subtract it out in getting taxable income.
Now, we get to the deferred tax part. All you need to do is look at the future effect for tax purposes. For items that are permanent differences, such as muni bond income, there are no deferred taxes involved because it will never result in more or less income and/or taxes for tax purposes. Thus, we only care about the temporary differences which are really just timing differences. Examples include the unrealized gain/loss on securities and different deprecation methods for book or tax purposes. If we had more income for book purposes now, we will have more taxes due later, resulting in a DTL. An increase in a DTL from the prior year results in a DTE. If we had less income for book purposes now, we will have less taxes due later, resulting in a DTA. An increase in a DTA from the prior year results in a DTC.
As far as unrealized losses, if the loss is not yet realized, it will be realized in the future. When it is realized in the future, there will be a loss. A loss results in lower income, which results in lower taxes. This means it is a DTA. Compare the current DTA to the old DTA, and an increase in a DTA will result in a DTC (credit). THE OCI feature is there because the unrealized loss serves as a buffer until the loss is actually recognized on the income statement.