The first thing to do immediately following an accident is to find out if there are any injured parties. If so, seek medical help before anything else. The police may also have to be called if the accident is a severe one, or if there were any pedestrians involved.
If the accident was the other driver's fault, they are legally obligated to provide you with their insurance details. You can also take their contact details if you wish. You then need to contact your insurance company and inform them of the accident, and they will advise you on further action depending on what type of motor insurance you have.
At this point it's a good idea to start collecting evidence from the scene of the accident. Take photographs of any damage to your car (a camera on a mobile phone is handy for this), speak to witnesses and ask if they'd be willing to give their contact details, and maybe take photographs of the surrounding area in case there are any factors that may have influenced the accident. The other driver may also be doing this if he or she thinks the accident was unavoidable.
It's important to act calm with the other driver. Standing in the middle of the street and shouting at them will not look good to witnesses, and may prevent the driver from giving you their car insurance details, which can delay a claim. Maintain a polite demeanour and the claim should go smoothly.
This also applies if you were to blame for the accident. If you know you were at fault the whole process will be easier for everyone involved if you admit it. If you are genuinely sure a collision couldn't have been avoided – for example if a child had run out between parked cars – then getting witness testimonies will help you greatly at this point.
Having a claim made against you may mean that cheap car insurance will be unavailable to you for some time, but provided it isn't a common occurrence you can begin to build up your no claims bonus again.

