It is almost the same as you do when driving a car or truck, but the brakes. Try to remain calm, and immediately let off the throttle.Next, apply your brake, but not on the tire that's going flat; apply it to the good wheel and slowly bring your bike to a stop somewhere safe.