First, don't leave the scene unless you like hit-and-runs.

If nobody is injured severely and the cars are still drivable, just exchange insurance information, phone numbers, and driver's license numbers, and note any vehicle damage. File a police report even if there's no damage, in case the other person decides to extort you later by claiming nonexisting damage or injury. If there is serious injury or damage, call for help.