Reinvestment rate risk and price risk
Reinvestment rate risk:
If i-rate , then yield from reinvestment of the cash flows and holding period return (HPR) increases.
If i-rate and you sell the security prior to maturity, the price or value falls, hence HPR falls.
Increases in i-rates will improve HPR from a higher reinvestment rate but reduce HPR from capital losses if the security is sold prior to maturity.
An immunized security is one in which the gain from the higher reinvestment rate is just offset by the capital loss.
This point is where your holding period equals the duration of the security.