I found it helpful to think of MIDI as a piano roll in those old player pianos. The rolls contained no musical information, only a set of perforations in the paper. Through mechanical means, the position and length of those perforations determined what note the pianola would play, and for how long. This concept is also behind the punched cards used in the early days of computer programming.
MIDI is the electronic equivalent, i.e. a set of instructions that control a music generating device (keyboard, sound module, etc.). Some mechanical music makers were highly sophisticated: multi-z-fold instructions fed into and activated a range of musical instruments on those complicated orchestrions. In the same way, MIDI can control pitch, volume, duration and a range of other sonic attributes, as well as telling a module which sound to use.
A keyboard with MIDI capability sends a stream of instructions through the MIDI port. Pressing a particular key generates a midi event, releasing the key generates another, how hard you press is also registered, and so on. Playing a piece generates a sequence of MIDI events that can be fed to another device, or saved and replayed later. This is like creating a piano roll in the first place.
Because MIDI is simply a set of instructions, it can be used to cause other parts of the system to do things as well, and they need not be related to music as such. Hence we see MIDI controlled effects generators, lighting desks and other things.
A big advantage of MIDI is that, once you have a MIDI file, you can do what you like with it. Each event is editable, and you can fix bum notes, change your mind about chords, try different instruments and so on. You can control tempo and pitch with ease, so it is great for working out new arrangements or developing new material. You don't need to play a keyboard to generate new sequences, you can graphically edit and create these on the fly.
A disadvantage is . . . um . . . I really can't think of any. What helps, though, in a musical application, is having a reasonable sound library. Some of the standard voices you get are not too good, and even sophisticated MIDI programming will sound pretty bad. What helps also is having an understanding of how the instrument you have selected is supposed to sound. Trying to replicate sax fingering and playing nuances is a keyboard skill not many have.