An overflowing toilet presents an immediate problem that you must resolve before the toilet can be used again. You will first need to stop the toilet from overflowing, and address the obstruction in the toilet's drainpipe to prevent it from overflowing again.
Turn off the Water
You will first need to stop the toilet from overflowing by shutting off the toilet's water supply. You will need to locate the toilet's shutoff valve, which normally is located low to the floor behind or next to the toilet. Once you find the valve, turn the handle clockwise as far as you can using your hand. Do not use a wrench or other tool to tighten the handle, or you could damage the handle or valve. If the water continues to flow, you will need to close the house's main water valve, which will shut off all of the water in the house, until you can repair the toilet. Clean up the water on the floor since leaving it can lead to water damage or mold growth.