The problem is rooted in the sound card that came with the computer. Doing what scook suggested will sometimes help.... it gives the hardware more time to think or look ahead, but ultimately, the sound card from the factory is woefully inadequate to do what Cakewalk software asks it to do.
This problem as you describe it, is worse with midi based music. It takes more time and power to process midi than it does audio.
Better performance is obtained with a dedicated USB based, external music interface, running ASIO drivers.
Most of us here are using the external interface and would never consider going back.