MIDI is a standard method of communication between different equipment. Many years ago, (pre MIDI) Korg, Roland, Yamaha, etc. all had methods for their equipment to communicate (say a drum machine and a sequencer) but you could not get a Korg to "talk to" a Roland.
Eventually, a standard system was desiged to allow a Roland keyboard to talk to a Yamaha module, etc. etc. This is very important if you have a sequencer (stand alone of computer software) which is used to control several differnet pieces of equipment.
Think of MIDI like an old time player piano. When you play a series of notes and chords (or drum beats) into a MIDI sequence it only "records" the performance (not the actual audio sound) - much like a player piano scroll. The sequencer then sends the performance back out to keyboard/module drum machine) and tells the equipment what notes to play. You can then set the equipment to trigger whatever "sounds" you want useing those notes from the sequence. You can also use MIDI for "real time control" meaning you play a note on one keyboard and the same note play on a seperate keyboard.
If you are new to MIDI you need to do some research - but it is worth it, since it can open up a huge world of creativity.