What is this pipe beneath my tankless water heater?
That is what we call a "pop off", or pressure relief valve. If the water pressure gets too high, that valve will open and drain into your waste water system. Its there so your tank, or hot water system, does not blow up due to getting too hot.