You learn to accept that it has happened, and that you are okay, and that it is in the past. You take deep breaths, and let it go. It will take time, and you may take more time to get over it than someone else would, and that's okay. There is nothing wrong with that.
Your brain will stop thinking about it after you heal the trauma. You still think about things that are dangerous because your brain wants you to be safe. So when you get to the point cars and driving are ok again, you will stop thinking about the accident.
While we all have issues that we deal with every day, a car accident can be a very scary thing. You are not alone in thinking about this and it happens to so many people! I found there are several ways to deal with this. First, try and discover what triggers you to have these thoughts and acknowledge them. Sometimes being aware of our thought process is helpful to avoid that trigger. For instance, if you think of it mostly during the day or when you are once again in a car, note it to yourself. Once you realize you are having these thoughts, decide if they are productive or not. If they are not productive, tell yourself just that. Even if you have to say to yourself "These thoughts are not productive, but they are normal and will pass. I am safe right now at this moment." Then, find a way to occupy your mind. This could be through some sort of positive thinking, reading, a walk with your favorite song or a happy memory. And as always, reach out to someone.. Getting things out in the open will help so much!