Most likely you are referring to the overflow pipe attached to the temperature relief valve on the water heater. This is a safety valve and helps relieve excess temperature and pressure inside the water heater in case of high pressure or an overheated water heater.