A drain pipe is a pipe system designed to carry wastewater, rainwater, or other liquids away from homes, buildings, and infrastructure to prevent flooding and maintain proper sanitation.