First, you really do need to spend some time looking at the on-line help and reviewing the manual. There is an incredible amount of information here and the video tutorials on-line are exceptional.
There are two parts to what you are trying to do. First, there is a sequencer. the sequencer says to play note values at specific times. Your keyboard provides note values and times using the MIDI protocol. The first action then is to insert a MIDI track and set the input for the MIDI track to point to your keyboard. When you record your playing for a MIDI instrument what you will be doing is saving the notes and sequences in the MIDI track (not the synth track).
This in itself will not make any sounds. The next part that you need is a synthesizer. Synths are audio devices and thus need to have an audio track. When you insert a synth into the track view, Sonar does this by creating an audio track with the synth being an effect on the track (although it may look differently).
Then you need to take the output from the MIDI track that you set up for your keyboard and direct its output to the track that has the soft-synth. The 'patch' for the soft synth is selected either by selecting a bank and program in the output portion of the MIDI track or by loading a program (instrument sounds) into the soft-synth. Which approach depends on how the soft-synth was written.
Now, the audio output from the synth audio track needs to be directed at your audio output (either to your sound card internal-or-external or to a bus that sends to the output device.
There are options that combine all of this functionality into a single track and make a project easier to work with, but I think that while learning it is best to keep the processes seperate.
Glen