You don't mention but if you turn the timer off or unplug the washer and water continues to fill then the water valve itself is most likely the problem.
If you turn the washer off and the water fill stops then the problem will most likely be with the water level switch, pressure hose or air dome.
To check the water level switch first remove the rear access panel off, after unplugging the washer, and access the water level switch and clear plastic hose.
This problem can be caused by a kink in the hose or even a small hole in the hose. With the washer empty remove the hose from the switch and blow through it towards the tub. You should be able to blow without to much effort. You might even hear bubbles from the sump of the washer as you blow.
If you can't blow or it seems difficult then the hose might be kinked or the air dome might be blocked.
If you can blow through it without much effort then reattach the hose to the switch and try another fill and see if the water shuts off.
If the hose is okay then the problem is most likely with the water level switch. The switch, or any parts, can be obtained from the following link:
. YOu will need the model number and the serial number to get the correct switch.
I hope this information is helpful to you in resolving this problem but submit another question with any additional details for further assistance.