as rocks1 says
at the end of the washer cycle the waste pipe is inserted in water causing suction to syphon the water back ito the machine.
do you have a connection in the u bend under the sink for the washers waste pipe or do you just put the washers waste hose into a vertical waste pipe...