MIDI messages tend to be 3 bytes. For example, a "Note On" message is 0x9Z 0xKK 0xVV where 9 is the "Note On" command, Z is the MIDI channel (since its 4 bits, you can have 16 channels), KK is the key/note (up to 128 ) and VV is the velocity (up to 128 different values).
 excluding system messages and the channel pressure command which has only 2 bytes
 the most significant bit is always 0 for data bytes. If its 1 (like in the first of the messages byte) it is treated as a command byte.