Tax-loss harvesting involves selling investments that have declined in value to offset gains from other investments, thereby reducing the overall capital gains tax liability.