There are a few incorrect assumptions in your question but the TL;DR version is:
All, or most, of the withdrawal is taxable income that is reported on Lines 15a (total distribution) and 15b (taxable amount) of Form 1040. None of the distribution is given special treatment as Qualified Dividends or Capital Gains regardless of what happened inside the IRA, and none of the distribution is subject to the 3.8% Net Investment Income Tax that some high-income people need to compute on Form 8960. If the withdrawal is not a Qualified Distribution, it will be subject to a 10% excise tax (tax penalty on premature withdrawal).
Not all contributions to Traditional IRAs are deductible from income for the year for which the contribution was made. People with high income
and/or coverage by a workplace retirement plan (pension plan, 401(k) plan, 403(b) plan, etc) cannot deduct any contributions that they choose to make to a Traditional IRA. Such people can always make a contribution (subject to them having compensation (earned income such as salary or wages, self-employment income, commissions on sales, etc), but they don't get a tax deduction for it (just as contributions to
Roth IRAs are not deductible). Whether it is wise to make such nondeductible contributions to a Traditional IRA is a question on which reasonable people can hold different opinions. Be that as it may, nondeductible contributions to a Traditional IRA create (or add to) what is called the basis of an IRA. They are reported to the IRS
on Form 8606 which is attached to the Federal Form 1040. Note that the IRA custodian or trustee is not told that the contributions are not deductible. Earnings on the basis accumulate tax-deferred within the IRA just as do the earnings on the deductible contributions. Now, when you make a withdrawal from your Traditional IRA, no matter which of your various IRA accounts you take the money from, part of the money is deemed to be taken from the basis (and is not subject to income tax) while the rest is pure taxable income. That is, none of the rest is eligible for the reduced taxation rates for Qualified Dividends or Capital Gains and since it does not count as investment income, it is not subject to the 3.8% Net Investment Tax of Form 8960 either. Computation of how much of your withdrawal is nontaxable basis and how much is taxable income is done on Form 8606. Note that you don't get to withdraw your entire basis until such time as when you close all your Traditional IRA accounts.
How is all this reported? Well, your IRA custodian(s) will send you Form 1099-R reporting the total amount of the withdrawal, what income tax, if any, was withheld, etc. The custodian(s) don't know what your basis is, and so Box 2b will say that the taxable amount is not determined. You need to fill out Form 8606 to figure out what the taxable amount is, and then report the taxable amount on Line 15b of Form 1040. (The total withdrawal is reported on Line 15a which is not included in the AGI computations). Note that as far as the IRS is concerned, you have only
one Traditional IRA. The A in IRA stands for Arrangement, not Account
as most everybody thinks, and your Traditional IRA can invest in many different things, stocks, bonds, mutual funds, etc with different custodians if you choose, but your basis is in the IRA, not the specific investment that you made with your nondeductible contribution. That's why the total IRA contribution is limited, not the per-account contribution, and why you need to look that the total value of your IRA in determining the taxable portion, not the specific account(s) from which you withdrew the money.
So, how much basis did you withdraw? Well, if you withdrew $W during 2016 and the total value of all your Traditional IRA accounts was $X at the end of 2016 and your total basis in your Traditional IRA is $B, then (assuming that you did not indulge in any Traditional-to-Roth rollovers for 2016), multiply W by B/(W+X) to get the amount of nontaxable basis in the withdrawal. B thus gets reduced for 2017 by amount of basis withdrawal.
What if you never made a nondeductible contribution to your Traditional IRA, or you made some nondeductible contributions many years ago and have forgotten about them? Well, you could still fill out Form 8606 reporting a zero basis, but it will just tell you that your basis continues $0. Or, you could just enter the total amount of your withdrawal in Lines 15a and 15b, effectively saying that all of the withdrawal is taxable income to you. The IRS does not care if you choose to pay taxes on nontaxable income.