MIDI stands for Musical Instrument Digital Interface and is a means of swapping information between suitably equipped electronic musical instruments, and PC’s. The information transmitted via MIDI is control information, not the actual sound itself.
As you play a MIDI keyboard, information gets transmitted as a series of messages – which notes you pressed and for how long, how hard you pressed them etc.
This information that is transmitted down a MIDI cable can then be used in a variety of ways.
For example, it can be used to play a software "instrument" on your computer, using the synthesisers on your soundcard to make the sounds. Hence, a relatively inexpensive MIDI controller can be used to make piano, synthesiser and other instrument sounds.
In addition, MIDI software packages allow you to easily edit the recorded MIDI data. Hence, mistakes are easily corrected, tempos or keys can be changed and tracks and be copied and different instrument sounds added.
One drawback of MIDI is that the standard set of MIDI sounds are a little cheesy. However, by upgrading your sound card, or even using software sound modules, you can get more realistic and sophisticated sounds.