A toilet works by gravity: The water in the tank—just enough to fill the bowl—drops down and pushes waste through the drain. The float drops, opening a valve that lets in water to refill the bowl and the tank simultaneously. The valve closes when the float rises far enough to shut off the water.
If the water from the tank can’t leave the bowl fast enough, then the refill will spill over. To stop the refill action, take off the top of the tank, grab the float, and pull it up to close the valve. That should give you time to reach down and shut off the water, or at least wait for some of the water in the bowl to drain.
A great book for homeowners is The Black & Decker Complete Guide to Plumbing for Homeowners, available on Amazon. It covers simple repairs like changing a faucet, Codes, how to install Pex, and is a wealth of information.