Check for injuries
Before anything else, check yourself, your passengers, and the people in any other vehicle for injuries. Call 911 if anyone is hurt. Do not move someone with a possible neck or back injury unless they are in immediate danger.
Get out of traffic
If the cars are drivable and the crash is minor, move them to the shoulder or the nearest parking lot. A stopped car in a lane is a hazard, and most states allow drivable cars to be moved out of the road after a minor crash. If the cars are not drivable, leave them, turn on the hazard lights, and get yourself to safety.
Call the police
Call 911 even for fender-benders. A police report protects you against fraudulent injury claims later. Some states require a report if damage exceeds a small dollar threshold; calling for any crash is the safe default.
Exchange information
Trade names, addresses, phone numbers, driver license numbers, license plate numbers, and insurance information. Photograph the scene from multiple angles, including damage on both vehicles, the position of the cars, and any visible road marks like skid lines.
Don't admit fault
Stick to facts when speaking with the other driver and the police. Do not say 'I'm sorry' or accept responsibility at the scene; many states make admissions at the scene admissible in court, and the actual fault analysis depends on details you may not have time to think about clearly.