The main function of the water pump is to prevent the engine from overheating by continuously circulating coolant throughout the system. It also helps to regulate the temperature inside the vehicle's cabin by circulating hot coolant through the heater core.