Why is it easy to balance a bicycle when it is in motion compared to when it is at rest?
Actually it is easier to balance a bicycle at rest then when it is in motion. The reason for this is the conservation of the angular momentum. A bicycle has wheels that once in motion, they rotate. Each rotating wheel is generating a non zero angular momentum.
If a person has done the experiment of holding a wheel in hands, one will remember how easy it is to change the direction of the wheel if it does not spin, but how difficult it is to move it once it has start rotating. To change the angular momentum (in absolute value or just in direction) one needs to apply a proportional torque (thus force).
The same phenomenon applies to bicycle. The angular momentum of the wheel is perpendicular to its plane, thus parallel to the ground. To change its direction one needs to apply a very big torque to it. Hence even if you tilt your position a bit to the left or to the right, you will not be able to change the plane of rotation of the wheel once it has started to spin fast enough. This is the explanation of why once you started to paddle and have a certain speed you will not fall off the bicycle, and why it is more difficult to maintain the equilibrium on a static bicycle.
a bicycle has a very thin base and as such it lacks balance. when it is at rest this base is constant and as such it cannot be balanced. its centre of gravity points off the base. when it is in motion however because of the riders body motion to the left and right the center of gravity keeps pointing to opposite sides of the base. so as the centre of gravity moves towards the riders left he peddles the right peddle downward causing the bike to tilt slightly to the right thus causing the centre of gravity to move over to the right. it is this constant change in centre of gravity that causes pseudo balance