MIDI is a musical standard or protocol that is designed to make information transmission or communication (message passing) easier between multiple musical devices over a connected network.
MIDI is an acronym that stands for Musical Instrument Digital Interface. An interface that governs the way the information transmission is done between musical devices using MIDI messages, this is the reason you can communicate from one keyboard to multiple keyboards, thus, building layers of synth. It is also the reason you can use your USB MIDI keyboard with your DAW application.
You can learn more about MIDI by reading the below guide.