Drain water, or grey water, heat exchangers run the warm drain water next to the fresh incoming water to raise its temperature a bit, taking a load off of the hot water tank.
Although there are more and more products to accomplish this available on the market. The problem is that most plumbing codes do not allow such systems to feed into drinking water taps for fear of contamination. They usually require a certain amount of double plumbing and they are marginally cost effective in a renovation. Installed as part of a new system, they can save a bit on the cost of heating water in your house.