Move to a safe location if possible immediately after the incident.
Collect personal and insurance details from all involved parties.
Notify the police.
Obtain contact information and statements from witnesses.
Capture as many photos of the accident scene as you can.
Contact an attorney.