If it's a flat tire, the first rule is not to panic. Signal, slow down gradually and carefully pull off the road on to the shoulder, avoiding any sudden maneuvers.
If you run out of gas or your engine stops, switch on emergency/safety flashers, carefully steer your vehicle out of traffic and let its momentum get you off the road to a safe place. Avoid applying the brakes until necessary.
Next: Pull off the road. »