The main parts of your tub or shower are much like those in a sink.
Potable, pressurized water is pumped through a water meter and separated into hot and cold pipes. While the warm water is heated, the cold water takes a detour around the water heater. The hot and cold water lines combine in the pipes leading to the showerhead or the tub spout. As you adjust the hot and cold knobs to get the perfect temperature.