MIDI is simply a data sharing protocol, to allow multiple devices to communicate with each other for musical purposes.
It stands for Musical Instrument Digital Interface. Information in a midi file is not sound, but merely the information about how to play a particular sound - the note number (middle C has an assigned note number for example), a 'note on' event, and things like bank and preset data. When a synth processes the data in a midi file, that information tells it through all sort of these events, how to trigger sounds (or pedal on/off, or to use patch #122, etc).
It is the equivalent of how old player pianos used to work. They had metal scrolls that had punched holes all over the place that when processed by the piano by reading the holes, it would know it was supposed to play Mustang Sally, or whatever. Each hole meant a different note, and the length of the whole would tell the player piano how long to hold the note.
Midi works in a similar fashion, storing all of that stuff in a consistent format agreed to by a consortium of musical equipment manufacturers. A bunch of folks got together and came up with a standard way to store all of these different events, so that each instrument or effect pr whatever could share the data back and forth. This allowed things like true layering of sounds, where before a Rhodes couldn't be linked to a Clavinett - but with midi you could play a D chord on one keyboard and it could trigger a string patch on an ARP, while also sounding a brass patch on some other keyboard. Quite powerful. It is used to control things like lighting, and also things like effects.
Anyways, there is tons of info out there on this, and tutorials cover this as well.
I have to run some errands, but if nobody else has explained it any farther by the time I get back, I will try to bring you up to speed a bit on getting this to work in Sonar. Once you get it working once, you will get it for all time, hopefully.
Bob Bone