There's two things going on here. The thing that I think is going to help you the most is recording and remembering your goal. The second is trying to figure out how to manage multiple projects. Understanding your goal will, in all likelihood, help you understand how to prioritize and manage.
I have a similar problem in that I've always got lots of projects going at once, and I ALWAYS have new ideas pop into my head. When I have a new idea, I take a moment to flesh it out VERY broadly. I note the goal, the result, or the outcome I'm trying to achieve. I note, very generally, how I'm going to get there. Once it's out of my head, I move on, back to my original project.
If I start getting restless because my NEW idea is more interesting than my old idea, depending on how much time I can or can't devote to it, I may take a break from my current project to work on the exciting new project. I understand my thinking enough to realize that I'm less productive doing Task A while thinking about Task B than if I took a break from Task A to do something with Task B. If I need to interrupt, I make enough notes to realize where I am and how to continue when I come back to it, and then turn my attentions elsewhere.
There are a lot of good resources on this site for time management and balancing multiple goals. The trick is to KNOW what those goals are. Once you're in the habit of noting your goals and exploring different time management techniques, you'll undoubtedly find a method that works for you. It may be to do one thing at a time, it may be to do many things at once, or, more likely, a blend of both depending on the projects and their priorities.
Whichever method works for YOU is the right one for YOU. Just remember you can't get anywhere unless you know where you're going. :)