Contributions to your traditional IRA aren't always tax-free. As of 2013, the maximum annual IRA contribution is $5,500, and the money's normally tax deductible. If you have a high adjusted gross income plus a workplace retirement plan, however, you can contribute the same amount, but you have to pay tax on some or all of it. The after-tax money is the source of your IRA's cost basis.
Add up the after-tax money you've contributed to your IRA over the years, and then subtract any withdrawals of after-tax dollars. The remaining after-tax money in the account is your basis, commonly called the cost basis. You report your after-tax contributions each year on your 1040, as they're part of your taxable income. You also report them on Form 8606. You have to submit the form if you added to your cost basis this year, even if you don't send in a 1040.
When you withdraw money from your IRA, you don't pay tax on any withdrawals coming out of your cost basis. It would be convenient if you could pick and choose when your withdrawals are taxable, but that's not an option. Suppose you have a cost basis of $15,000 in a $60,000 IRA. The cost basis is 25 percent of the account, so IRS considers 25 percent of each withdrawal to have come out of the basis.
Your cost basis comes into play when you convert a traditional IRA into a Roth. Roths work in the opposite direction from traditional accounts: you pay tax when you put money in, and nothing when you take it out in retirement. When you convert, you pay tax on the money you move to your Roth, except for the cost basis, because you've already paid tax on that money once.
Your traditional IRA shields you from paying tax on your gains until you start making withdrawals. Unfortunately it also shields you from claiming any losses on your IRA investments. You can only take a write-off for an IRA loss when you completely distribute the contents and empty the account. If the distributions are less than the total of your cost basis, you have a deductible loss. You claim it on Schedule A as an itemized deduction.