After you flush your toilet, the water should run until the tank is full and ready for the next flush. If the water keeps running and never shuts off, the problem is in the tank.
Inside every toilet tank is a fill valve, which begins filling the toilet when you flush. The valve has a float that rises with the water level and shuts off the valve when the tank is full. You can adjust the height at which the float considers the tank "full."
The tank also has an overflow tube, which has an opening set just above the toilet's "full" level. If the float malfunctions and the water keeps running, the excess goes through the tube and into the bowl.
Float Set Too High
If the float's "full" position is set too high, water will start going into the overflow tube before the float has a chance to shut off the valve, so the water keeps running. If you see water pouring into the tube when you remove the tank lid, adjust the float height.
The other possibility is that the float never reaches the full position because water is leaking into the bowl around the flapper, the hinged plug that seals the opening from the tank to the bowl. The flapper should form a tight seal after every flush. Put a few drops of food colouring in the tank near the flapper, but don't flush. If you see that colour in the bowl, adjust or replace the flapper.