Get off the road safely first
Before anything else, get the vehicle onto flat, stable ground well clear of traffic, apply the handbrake, and put it in park (or first gear/reverse for a manual). Hazard lights on, and chock the wheel diagonally opposite the flat if you have wheel chocks handy.
Loosen before you lift
Loosen the wheel nuts slightly — about a quarter turn — while the tyre is still on the ground and taking the vehicle's weight. Trying to loosen nuts once the wheel is off the ground and spinning freely is far harder and less safe.
Jack it up and finish removing the wheel
Position the jack at a proper rated jacking point (check your owner's manual — this varies by vehicle) and raise the vehicle until the flat tyre is clear of the ground. Finish removing the loosened nuts, pull the wheel off, and set it aside.
Fit the spare and lower carefully
Mount the spare, hand-tighten the nuts in a star pattern (not sequentially around the circle) to seat the wheel evenly, then lower the vehicle until the tyre just touches the ground before fully tightening the nuts to spec. Lower the rest of the way and do a final check of the torque once the vehicle's full weight is back on the tyre.
Get it looked at properly, soon
A space-saver or off-road spare gets you moving again, not indefinitely. Get the damaged tyre inspected or replaced, and the spare checked, as soon as you're back near a tyre shop — especially before your next trip off the black top.
