Accumulation of minerals from hard water prevents the flapper from sealing completely. If enough water leaks out of the tank, then the refilling mechanism is triggered resulting in a “phantom flush.”
If the chain is not attached correctly (or if it is too long or too short), this can hinder the flapper’s ability to completely seal the hole, thus resulting in a randomly running toilet.
If this valve is damaged or leaking, water will continue to fill-up in the tank, causing the toilet to keep running.
If the water level in the tank is not accurate, this could cause a toilet to run randomly. The water should rest 1 to 2 inches (or 2.5 to 5 cm) below the fill valve. If it is higher or lower than this amount, the off-balance will likely result in a "phantom flush".
By not returning to the original position after flushing, the handle can let more water into the tank than necessary.