Turn the heater off.
Turn off the cold water supply to the heater, open a hot water faucet upstairs, and drain about 10 gallons from the heater drain valve down at the bottom. (This last step is somewhat trial and error, you need to get the water level in the tank below where the P&T valve screws in.)
Unscrew the old P&T valve and screw in the new one.
Before turning the heater back on, you should have water pouring from a hot faucet to prove that the tank has been refilled.
The disadvantages of crab apple trees. In summer, the apples are too sour to pick and eat. In winter the birds come and leave dropping all over the place.