I'm going to be replacing my shower valve cartridge and I was wondering about how to go about shutting off the water supply. I'll be shutting off the main line for the house; I assume I'll need to shut off the water heater hot water outlet as well. Do I need to shut off the water heater inlet, or take any other precautions to prevent build up of pressure, air getting into the system, et cetera?
Shutting off the water line at the entrance to your home should be good enough for most instances.
The only exception is if the water heater is above the location of the cartridge you are replacing; water might flow from the heater to your location. To avoid burns, open a tap at a higher elevation and drain the line/tank or if you have shutoffs at the tank, close them. If you are draining the tank, it would be best to turn off the gas or electricity to the heater to avoid damage to the tank and/or elements.
If you are still concerned, just turn off the tank. Occasional shutoff to the water heater is not harmful. But your tank should have a pressure relief valve to avoid over-pressure and damage.
Air in the waterlines is not harmful. Open your taps and turn on the main and purge air from the system.
If you shut off the water heater, only turn it back on after you have purged air from the waterlines.
No matter which procedure you took above, it is very likely you disturbed scale on the inside of the supply lines and it will cloud your water. Let the taps run for a few minutes to purge this as well.