Faucets control water temperature mechanically by utilizing valves or cartridges that regulate the flow and mix of hot and cold water. These valves or cartridges are typically operated by faucet handles or knobs. Inside the faucet body, there are separate hot and cold water supply lines that lead to the valves or cartridges. The valves or cartridges contain seals, discs, or other components that open or close based on the position of the faucet handles. When you turn the handles, the valves or cartridges adjust the flow rate of hot and cold water, allowing for temperature control. By manipulating the handles, you can mechanically control the amount of hot and cold water being mixed, which ultimately determines the water temperature at the faucet outlet.