On every water heater, there is a Temperature / Pressure Relief Valve. The TPRV is a safety valve that will relieve the pressure in the event of the water heater overheating. That safety valve has a drain line, which will drain the dangerously hot water to the outside or to a floor drain.
The TPRV drain line should be at least ¾” in diameter, and can be made from PEX, CPVC, copper or galvanized steel piping, and because it is a drain line, must slope downward for proper drainage. It is very common for me to be performing a home inspection, and find a water heater supply line being used to connect a TPRV drain line. This is easy and convenient, but is not correct. A water heater supply line is usually ribbed (which can cause restriction), and is not a full ¾” in diameter. They are also flexible, and are easily kinked.
The TPRV drain line should be piped to the building exterior, or needs to extend to within 6” of the floor if there is a floor drain nearby. Also at the drain line termination point, there cannot be any threads, which prevents someone capping the drain line off. There have been many homes blown off their foundations due to someone capping or plugging off the Temperature Pressure Relief Valve because it started dripping. If the water heater ever overheats and the TPRV has been capped or plugged, it becomes similar to the cylindrical devices we drop from airplanes that go ‘kaboom’ when they hit the ground. NEVER cap the end of a TPRV drain line, even if the drain line is dripping! Call a plumber, and have the problem corrected properly.