There are two main types of MIDI messages. Channel messages, which are channel specific, consist of Voice and Mode messages. System messages, which do not have a channel number, and are received by all units in a system, include Common, Real Time, and Exclusive.
The information about various types of MIDI messages and the data structures associated with it is somewhat complex. For more information about this topic, we refer you to the various books and magazines. See More Information about MIDI and Magazines.