How a washing machine works. As a washing machine runs through its cycles, it pumps out dirty water to make room for the clean water it needs to rinse your clothes. It pumps the dirty water through a rear-mounted outlet tube fitted with a flexible discharge hose. The flexible hose flows into a drain pipe that connects to the main sewer line.