If you are using your computer (Sound Blaster) soundcard for a MIDI synthesizer, then you can do everything internally. Go to the volume control panel, then click properties, then options, and go to select recording. Now you can choose where to record from. Select mixed output, as that will have everything in it. Then in Cakewalk, click record (turn the metronome off), and wait until the piece is over. Then you should have one track with everything on it, which can be exported as a WAV., MP3 etc.
If you're using an external synthesizer then just plug a cord from the headphones slot on the synth to the line-in on the back of your computer.