Make sure your vehicle is as far off the road as possible to avoid an accident.
Turn on your hazard lights.
Put flares or warning triangles behind your car to let other drivers know it's there.
Stay inside your car or in a nearby building - someplace with a view to see when the tow truck arrives. Lock your doors if you stay in the vehicle.
Crack the window to talk to anyone who stops. Avoid opening it all the way.
Gather things you don't want left in your car. You will either have to get a ride to the garage or ride with the tow truck driver.