In most cases, you'll be able to cancel the first, second, or the last leg of your connecting flight, except if you've purchased a non-refundable flight. That said, it definitely won't be cheap. You'll need to pay any differences in ticket prices plus flight cancellation fees, which range between 100-200$.