Your washing machine has hoses that connect for both hot and cold water. These rubber hoses can wear out over time due to high water pressure and vibration during years of use. Inspect the hoses to see if there is any bulging or softening in the hose. A broken washing machine hose can cause a lot of water damage given the volume and pressure of water in these hoses that service the washer. There is also a drainage hose that should be inspected as well.
The first thing to do is unplug the washing machine from the power supply. Then shut off the hot and cold water valves that are usually exposed in small box mounted in the wall behind the washing machine.
Unscrew the existing hose from both the valve side as well as where it attaches to the washing machine. Flexible metal mesh hoses are great as replacements for rubber hoses. Attach the hoses to both sides, turn the valves for hot and cold water open and plug in the washing machine.
Here is a great video from Ron Hazelton.