An accident can be a scary event. Of course, if there are injuries, the very first thing you should do is call 911. After all vehicles have been moved out of traffic and everyone is safe and secure, there are some general guidelines as to what information you should collect and provide to the other parties.
By law, basic information such as names, addresses, and registration information must be exchanged. Insurance information should also be obtained. Also write down the make, model, year and condition of the cars involved, the date, time and location, and number of passengers in the other car(s) (believe it or not, we've seen extra people inexplicably "appear" claiming injuries).
If there are witnesses, talk to them as soon as possible, especially if they approach you first (which usually means they believe you are less at fault). Take down their contact information immediately, as they may not be willing or able to wait around until the police arrive. Never admit fault at the accident scene since a thorough investigation might reveal otherwise.
You should keep a form in your glove compartment to organize this information (you can download and print out a handy form at Ajalatlaw.com).
Lastly, it is helpful to keep a disposable camera in your glove compartment. This will allow an important record of visual conditions as they were at the time of the accident and the conditions of the people and vehicles involved. If you have a camera phone, use it in the same way.