| MadSci Network: Physics |
The basic guiding principal that makes it easier to stay on a bike while it is moving is gyroscopic precession. As the wheels rotate, they form two large gyroscopes with considerable angular momentum. As you attempt to lean to one side or the other, the wheels precess. This develops a force pushing you back up and making it easier to stay upright on the bike.
For more on gyroscopic precession, I would suggest checking out some basic physics textbooks. You can also get gyroscopes at many local science stores or Edmund Scientific. Most of these gyroscopes come with experiments on gyroscopic precession. For more on how bicycles work, check out How Things Work - Bicycles.