It's unfortunate, but accidents tend to happen. The first step is to remain calm, assess the situation, and make sure that everyone inside the vehicle is okay. Then, depending on the severity of the accident, either call 9-1-1 or your local police department who will dispatch an officer to you. If it's safe to do so, move your vehicle on the side of the road, if you can't drive your car, put your hazard lights on.
The next step is to write down the names, addresses, telephone numbers and driver's license numbers of all other drivers and the license plates of all other vehicles. You should also note down information of the owners of all the vehicles and get insurance information of each of the other vehicles as well.
Jot down specific details about the incident to ensure that everything is accurate as it's been written down while the occurrence was fresh. Lastly, after everything has been reported and all information has been collected, report the accident to your insurance company as soon as possible after an accident to begin the claim process.