Typically the drain pipe for such heat exchangers is a normal drain pipe — large diameter, no kinks, etc. — and made out of copper. A larger pipe surrounds it, bushings and T sections at either end of the segment. Cold water flows into one T section, flows around the drain pipe and extracts heat, then out the other T and into the cold water input of the hot water heater. There are a million YouTube videos on how to make one, and there are now readymade commercial products to buy, too. The tricks are getting at your shower drain and getting the cold water input piped over to it.