Answer:
A valve is used to reverse the flow of freon. In the heat mode, the high or hot side gas is pumped to the indoor unit, The low or cold side is pumped to the outdoor unit. The valve is reversed for the cool mode. Pumping cool gas to the indoor unit and hot gas to the outdoor unit.