There is a button called Input Echo, (just to the right of a track's Record button), and when you bring the midi track into focus for the instrument you are trying to hear, Sonar - by default - will turn that track's Input Echo 'On. This allows you to hear the sound produced by the synth, as long as the midi track has its Output assigned to the synth in question.
When you click on a different midi track, Sonar will - by default - turn Input Echo 'Off' for the prior track, and turn it 'On' for the new midi track that is now in focus.
I sometimes like to hear layers of multiple midi tracks at the same time, so I will click on one midi track to bring it into focus, and get its input echo turned on by Sonar, and then I will manually click input echo to 'on' for any additional midi tracks I want to hear at the same time.
This is most used by me for things like a layered electric piano sound, or a piano/strings combination.
Bob Bone