There are actually several questions wrapped up in what you have asked. If you don't mind, I'd like to sort them out, and tidy them up a bit:
Why is it that leaning into a turn while on a bicycle results in the bicycle changing directions rather than falling over. Put another way, why doesn't a bicycle fall over when you lean into a turn while riding.
What's up with people falling over while riding a bicycle, notwithstanding everything that goes on in discussion #1 above.
A bit of a thought experiment will sort all this out:
A person who attempts to lean a bicycle over while the bicycle is stationary will fall over. Most skilled riders will stick their foot out to break the fall, but never mind this. Obviously, leaning into a turn only works when the bicycle is in motion. And the bicycle has to be moving at a certain minimum speed in order for this effect to really work anyway.
A person who leans a moving bicycle over slightly will succeed in turning the bicycle into a new direction of motion rather than tipping over.
these two facts show you that when you lean into a curve on a moving bicycle, one of the forces at work is the gyroscopic action of the moving bicycle wheels. They are turning, and they experience friction and torque (in several directions). But they also have to obey the rules of angular momentum, which ultimately results in the bicycle turning direction rather than falling. A stationary bicycle wheel isn't rotating, and doesn't have the additional rules of angular momentum to deal with.
A person who leans a bicycle over too far will fall (or will need to break their fall somehow) no matter how fast they're going.
Riding a bicycle on wet, slick ice (i.e. a frictionless surface) is bound to fall over sooner or later no matter how good they are.
These two facts show you that friction is at work in a bicycle's behavior, and that the rules of momentum can be overcome by enough torque to the left or right.
Young children and other inexperienced bicycle riders have quite mastered the juggling act of managing friction and angular momentum well enough to avoid situation #3 above, and they fall over sometimes. Wild, raucous maneuvers like I used to do when I was a kid may result in situation #3, or even #4 above :-)