A toilet bowl in basketball is a shot attempt which rolls around the rim before ultimately falling. The shot will typically go into the basket for a made-shot, but can occasionally roll the other way and force a miss. The name is derived from the shot's similarity to water swirling around the toilet bowl as it is flushed.
In any basketball shot, the angle at which the ball hits the rim or backboard is hugely important to the outcome of the attempt. Because the basketball is spinning when you shoot it, when the ball hits the rim at a specific angle, it can continue spinning by using the rim as a guide! When hit at the perfect angle, the ball will continue moving around the rim so it does not have to stop spinning, causing the toilet bowl effect with the shot.
Depending on where on the rim the ball is spinning, the ball may go into the basket or fall back into play for a potential rebound. If you see a shot begin to toilet bowl, get close to the basket for a potential rebound or put-back!