What do you do when you get in a car accident?

Say you’ve been hit or you’ve hit someone. Not to the point where a person needs to go hospital but just physical damage to both cars. What is the process? I want to be aware as I’ve recently passed.

Thank you.