IRA's (and 401K's) are tax-deferred. You pay no taxes for gains within an IRA (and 401K) in the year that the gains/losses are incurred. Rather, you pay taxes on each withdrawal from the account in the year that you make the withdrawal. Withdrawals are taxed at ordinary income rates when withdrawn. If withdrawals are made before your age 59 1/2, there may be a 10% penalty for early withdrawal, if it does not qualify for certain IRS rules.
EXCEPTION: If the IRA is a Roth IRA, you pay no taxes at any time (and you cannot deduct the losses).
There are certain conditions where if the IRA is a ROTH that you can claim losses, you need to withdraw from the ROTH; and at the time can deduct losses, there are times when this can be done penalty free, you then can only put back into the ROTH the yearly max tho; (typically 4k) Its an odd exception but real. You can look it up for the full details.