A diverter valve is a mechanical device used in heating systems to control the flow of fluid (usually water) between different outlets or channels. It directs the flow of water to the desired location, enabling users to switch between different functions such as heating or hot water.