You are to stop-- if you are right by the accident, the officials may ask you to to move away in a safe manor-- If you are no where near the accident and can get off the track without going near the incident, you can exit the track to work on your car, you will go to the back like going off the track any other time.
They instituted that rule to help keep cars from totally melting down.