1) Turn off the electricity to the washer. If the water *stopped* filling when power was disconnected, the problem would usually be in the control system of the machine. If the water still continues, then the plunger in the water valve is either stuck open or slow to close. Try turning the water faucets off an on a few times. This small jolt might unstick the water valve. If not, it will need replacing.
2) There could be a problem with the water level switch. Call in a repairman.
3) There is a pressure switch hose that is attached to an air dome. This switch tells the washer that there is water in the tub and allows the agitator to start. – Remove the control panel and you will notice a small hose. See if it popped off of the air dome. If it did, secure it with a zip tie.
Washer Won’t Stop Filling – Drains Immediately
If water flow continues, but drains out immediately, then raise the drain hose above the highest water level line of the tub. Do not seal the drain hose to the discharge pipe. This could cause a siphoning action.