Are you using your internal sound card? If so, there may be too much going on for it to handle what is being asked of it.
Dropouts occur due to the inability of the computer to process the audio at the sample rate and bit-depth that it is set to.
There are lots of causes for this, such as programs running that are either memory or CPU-intensive, a slow CPU, too little memory, slow hard drive transfer, etc.
IF you are using on-board sound, you may want to consider picking up a dedicated audio interface. In addition to them being having differing numbers of inputs and outputs, as well as pre-amps and differing levels of quality in their digital/analog convertors, the universally best feature of them is that they move the workload of processing that signal away from your computer's CPU - in other words, they take on the job of doing all of the work of the analog to digital and digital to analog conversion. This makes a HUGE difference in terms of reducing the load on your computer, and generally is HUGELY beneficial at reducing and/or eliminating dropouts. Audio interfaces can range from around $100 up to lots more than that, with reasonable ones running around $200, for a few inputs/outputs, pre-amps, and converters.
I would suggest you download and run a freeware program called DPC Latency Checker. It analyzes and reports on detected latency in your system, and lets you know where your computer currently stands, in terms of being able to stream audio at acceptable performance levels.
The program can be downloaded from:
http://www.thesycon.de/deu/latency_check.shtml There is another program called LatencyMon that does a great job of identifying resource hogs, as well.
This program is also free, and can be obtained from:
http://www.resplendence.com/latencymon Your computer may have a BUNCH of things running that also get in the way of audio streaming performance, and looking at the results of LatencyMon and also taking a look at trimming the application 'fat' would go a long way to helping your system run better when using Sonar. Look for programs in the system tray, as well as those that are background services that are actively running, that you might not need to have running all the time.
As an example, print spooler is a service that is only needed for printing, yet it runs all the time. There are a number of these kinds of things you can look at tweaking to optimize your computer for running programs like Sonar.
Can you please detail your system specs? You can look at my signature at the bottom of this post for an example of listing them. Typically, it works well for this forum for folks to add their specs to their forum profile's Signature, so that they are always present when you post. (don't forget to check the box to tell it to always include your signature, after you add them).
So, lots above to look at - try starting with downloading and running DPC Latency Checker and/or LatencyMon, and posting back the results, along with your system specs, so that we can start helping you to isolate the cause of these dropout issues on your system.
On the bright side - this is almost ALWAYS a solvable problem, so hang in there, and let's collectively get you up and going.
Bob Bone