MIDI (Musical Instrument Digital Interface) is a protocol developed in the 1980's which allows electronic instruments and other digital musical tools to communicate with each other. MIDI itself does not make sound, it is just a series of messages like "note on," "note off," "note/pitch," "pitchbend," and many more. These messages are interpreted by a MIDI instrument to produce sound. A MIDI instrument can be a piece of hardware (electronic keyboard, synthesizer) or part of a software environment (ableton, FL Studio, Garageband, digital performer, Logic...).
The advantages of MIDI include:
compact -an entire song can be stored within a few hundred MIDI messages (compared to audio data which is sampled thousands of times a second)
easy to modify/manipulate notes -change pitch, duration, and other parameters without having to rerecord
change instruments -remember, MIDI only describes which notes to play, you can send these notes to any instrument to change the overall sound of the composition.
It's easier to work with MIDI when you have a MIDI compatible keyboard. Check out some keyboards at Guitar Center here https://www.guitarcenter.com/MIDI-Keyboard-Controllers.gc.
For more information about MIDI, visit https://www.instructables.com/What-is-MIDI/