My first advice would be to make sure you yourself are safe. Car wrecks are dangerous places to be—vehicles can tilt or move, and traffic is extraordinarily dangerous. So make sure you can be safe. Make sure emergency services have been called and provided with good, accurate information (such as number of vehicles, if people are trapped, if there is fire, if victims are unresponsive, etc.).
If the vehicle is on fire, get everyone out. But be aware that a lot of the “smoke” associated with an accident is actually from the airbags (its mostly corn starch and the propellant that makes them expand).
If a person is unresponsive, has altered mental status, is drunk, has major injuries, or has neck pain, they shouldn’t move. Best thing you could do is hold their head in a neutral, inline position with their spine until professional help gets there.
If a person isn’t breathing (at all, and you have to look-listen-feel for at least 10 seconds) then CPR would be a good idea to do.
If they have significant bleeding (like its gushing like a faucet or spurting) then try to apply direct pressure to stop it. If it doesn’t, put a tourniquet on the extremity. Lots of things can be improvised into tourniquets.
The good news is that very, very few accidents have serious injuries. Most of the time, everyone is fine and you can help to reassure them, see if they need any help, and then clear out of the way for fire/law/ems.