Tax-loss harvesting is turning a paper loss into a tax benefit without changing your portfolio much. You sell a holding that is worth less than you paid, realize the loss, and immediately buy something similar but not substantially identical, such as a different broad-market index fund. You stay invested, and the loss becomes a deduction.
The loss first offsets capital gains. If you have $10,000 of gains from selling RSUs and harvest $10,000 of losses elsewhere, the gains are wiped out. Any leftover loss offsets up to $3,000 of ordinary income per year, and the remainder carries forward indefinitely to future years.
For someone in a high bracket, this is real money. Harvesting $15,000 of losses against short-term gains taxed at 35% saves about $5,250 this year. The trade-off is that the replacement holding has a lower basis, so more of the gain shows up later. Harvesting defers tax more than it eliminates it, though the deferral can last decades and the later gain may be taxed at lower long-term rates.
The common mistakes are triggering a wash sale by buying the same fund back within 30 days, and harvesting in a taxable account while a retirement account automatically buys the same fund. It only works in taxable accounts; there are no gains or losses to harvest inside a 401(k) or IRA.