After filling in any net capital gains income on Schedule D, you'll come back to Form 1040 where you'll have to include any retirement or pension income which you've received. Money that you stash into your 401(k) or IRA account is tax-deferred, but it's not tax-free. This is the place where the tax man catches up with you and puts an end to your tax deferral.
Remember that most income that you deposit put into IRA or 401(k) accounts doesn't appear in your taxable income. The tax on this income is deferred.
Further, as you work, the money in your retirement account grows completely tax deferred. You won't get 1099s showing that you have to report income from your tax-sheltered retirement account.
Things change, however, after you retire or otherwise withdraw money from the plan. When you receive money from an IRA, a pension or an annuity, you also get a Form 1099-R at the end of the year.
This form shows you, and the IRS, how much you received from the retirement account. It also shows the amount withheld, if any, by your pension plan for income tax purposes.