The definition of MIDI
MIDI is a very fundamental data format in the world of music production. While it does not contain any audio, it contains the information of what an instrument plays, i.e. which keys are played and at what velocity. It can also contain other information such as sustain pedal use. A MIDI file can both be recorded by the use of an electronic keyboard (or other devices supporting MIDI) but it can also be created manually in MIDI editing software (e.g., Logic Pro X which I use).
When a MIDI file is loaded into MIDI editing software you will be presented some sort of x‑y-plot with keys on one axis and time (bars) on the other axis just as shown below.