Nine times out of ten, the blockage is caused by flushing something unsuitable down the toilet. A toilet is designed to dispatch water, waste and toilet paper, full stop. Other items such as wet-wipes, sanitary products, diapers or paper towels are likely to cause a blockage. A common blockage location is the s-shaped trap that prevents nasty sewer smells issuing from the toilet bowl into your bathroom. The bend in the trap makes this region of the toilet is susceptible blockages by all the usual culprits. The blockage could also be in your drain pipes. Bends in the pipes are common locations for a build-up of unsuitable material and eventual clogging.
If you notice other drainage issues, like a backed-up sink or gurgling drain, you may have a blockage in the lateral sanitary line. This is the main sewage drain that joins your home plumbing to the municipal sewage system. Those non-flushable items often build up in the lateral sewer line and clog your drainage system over time.
Other common causes of this messy problem are issues with your septic tank and low flow toilets.
Whatever caused your overflowing toilet, unless the mess is cleaned up fast, water damage from toilet water can cause extensive damage to the bathroom floor. Toilet overflow from an upstairs bathroom can even seep through to the ceiling underneath.