If your toilet cistern keeps overflowing then the problem is most likely to be either the float, the inlet valve or both.
The purpose of the ball float, arm and valve is as follows:
-When the toilet is flushed, the water empties from the cistern. The float then drops down to the bottom of the cistern as the water level drops. The arm attached to the float is also attached at the other end to a valve and when the float and arm falls with the water level, the valve is opened to allow the cistern to refill. The float and arm then rise with the water level and the valve is automatically closed, this prevents the cistern from overflowing. The arm furthest from the float has an adjuster screw which can be tightened or loosened, this is used to determine the water level in the cistern. If the water is draining out through the overflow pipe (this could be either a pipe through the wall to the outside or an internal overflow that drains back into the toilet pan) then the overflow pipe is doing exactly what it is supposed to do.
The problem will be one of the following :
1. Grit in the valve
2. Faulty Washer
3. Punctured Float
4. Adjuster screw
5. Faulty Valve