Clean the tank ball and seat over the drain if the valve turns on and off when the toilet is not being flushed. Wipe them both off with a washrag to remove any dirt that may have built up. You may also need to replace the ball or flapper itself, if cleaning does not remedy the problem. Typically this is a result of corrosion, which weakens the seal.
Use an angle adapter to check that the black vinyl refill tube is attached to the top of the overflow pipe. If the overflow pipe is too far down, the siphoning action will cause the valve to turn on due to low water levels.
Adjust the water level adjustment clip to a lower level by sliding it down the valve. The overflow may get small amounts of water, causing the refill tank to turn itself on when unnecessary.
Remove the valve cap and turn the water supply on and off three times to remove debris that may be lodged in the line. A buildup of debris can cause the valve to continue to fill, causing overflow.
Check that the valve cap is on securely by rotating it clockwise until it is in a locked position. The valve will not turn on without the cap being secure.