When you play the middle C key on a music keyboard, it sends a short message that translates to 'play middle C'. When you let go of the key, a message is sent that translates to 'stop playing middle c'. In addition, the message contains other information, such as the MIDI channel and key velocity. There are 16 MIDI channels which allow you to route MIDI messages. The key velocity is a number from 1 to 127 which describes how fast the key was depressed. A velocity of 1 would hardly be heard and a velocity of 127 would be full volume.
Each MIDI Note message contains the following information: Note Value (C0 - C10), Key Velocity (1-127), MIDI Channel (1-16)
This is the value of the note. There are 128 possible MIDI notes. Note 0 corresponds to 'C0', where 'C' means the note C and '0' means octave 0. Note 127 corresponds to G10. A normal eight octave MIDI piano keyboard has a range from A1 to C9.
This is how fast the key was pressed. Faster velocities usually corresponds to louder sounds or may trigger extra sounds, depending on the synthesizer.
This is the channel that the note is on. MIDI channels allow you to route specific channels to specific synthesizers and/or tracks.