If you find that there is water dripping into your washing machine tub it is most likely due to a bad water inlet valve. Sometimes the valve will not close all the way allowing water to slowly drip into the tub. If this happens, you would need to replace the water inlet valve.
If water is overflowing into your washer it could either be a bad water inlet valve or an electrical problem. To determine if it is a bad valve, turn the washer on so that it starts filling with water then unplug it to see if the water stops coming in. Try this on different water temperature settings. If the water keeps pouring in then you know its a bad water inlet valve that needs replacing. If the water stops pouring in then you know its an electrical problem and you would need a multimeter and the wiring diagram to find the culprit.