Whoa, everybody! I'm a little discouraged that so many folks are trying to treat this with meds alone. That never would have worked for me. Until recently, I have had this endless monologue going on in my head most of my life--worrying, analyzing, judging, playing the "what if" game, etc. I've been on a few meds--as well as drinking too much at times--but all these really do is take a little of the edge off. What is working for me is a combination of deep, traditional Jungian talk therapy regarding my childhood, along with a lot of spiritual work. I cannot speak highly enough of the work of Eckhard Tolle--a spiritual teacher who once suffered from these "voices in the head," understands them, and teaches very wisely. His books are widely available online and at stores-- I've even seen them at our local Target department store. I personally love his audiobooks, which he narrates himself and are available on ITunes. Meditation is also immensely valuable. The key technique (this also works for getting to sleep) is to focus ALL your attention on your breaths--count them, feel them, experience them. When you feel thoughts trying to intrude, simply label them "thinking" and dismiss them. Do not give them any validity or energy. I often picture myself putting these thoughts into the basket of a hot air balloon and then watching them drift away. Eastern teachings like Buddhism, Tai Chi, Zen, and of course meditation are also immensely valuable here. And if you like a high-tech crutch, as I do, the "Wii Fit" package for the Nintendo Wii video game system has both a meditation program and a deep breathing program.
...and then there is the talk therapy. It's so crucial to get a good therapist, one that challenges you and does deep work, not quick fixes, nor simply sitting and listening to you ramble on. I grew up emotionally caring for needy parents, and I had to let go of that (my mother is still alive, my father died in the last few years) before I could even begin doing the spiritual work I described above.
Finally, if you want to understand what is going on in your brain when this happens, check out Daniel Goleman's book "Emotional Intelligence." Essentially, your brain fires the "fight or flight" reflex and adrenal hormones fill your body before the rational part of your brain, which is connected to the body via the vagus nerve, has a chance to respond. If you KNOW that's what's happening to you, it's easier not to validate the stream of irrational thoughts that come flooding in and let them take over you!