The toilet leaks when the seals holding the pieces together break, lift or shift. Usually, these seals can be mended or replaced with your own elbow grease but a licensed plumber should attend to serious flooding or leaks.
You can locate these seals at the:
Tank and Bowl
The seal that connects the tank to the toilet bowl is the largest seal in the toilet system. When this seal breaks, a large amount of water spews out from beneath the tank.
To replace the seal, first drain the toilet. Then, for ease of access, it is recommended that you flip the toilet upside down. Remove and replace the seal beneath the tank. When complete, reinstall the toilet in in its upright position.
Base with mounting bolts
At the base of the toilet bowl is a plate mounted down with bolts. When these bolts loosen or the seal lifts, water escapes from the bowl.
A simple tightening of the bolts may fix the leak. Otherwise, amend the leak in the same manner you would with the larger seal.
Flange underneath toilet base
The flange is a special gasket-like piece that affixes the toilet bowl drainpipe to the drain installed on the floor. When the flange shifts, lifts or breaks, water leaks from below the toilet bowl to underneath the flooring.
If you detect that a broken flange is to blame for bad leaks and rotting floors, call your local plumber to replace the seal. Similar to how you have your favorite HVAC contractor come troubleshoot your furnace and air conditioner, try to make a habit out of sticking to one plumber who can get to know your toilet and its idiosyncrasies.