MusicTechHelpGuy explains MIDI as a standardized language that lets keyboards, controllers, and software instruments communicate, replacing the incompatible proprietary systems that plagued gear back in the 80s.
Every note carries more than pitch. Velocity, how hard or fast you hit a key, gets encoded as a value from 0 to 127, with 0 meaning note off and 127 the hardest possible hit.
Logic's piano roll colorizes notes by velocity, and those values can be edited after recording, a quick way to reshape a part's dynamics without replaying it.
That same 0 to 127 range extends to mod wheel, pitch bend, knobs, and faders, which is why one simple protocol can drive such a wide range of expressive control.