The MIDI Specification

MIDI (ie, Musical Instrument Digital Interface) consists of both a simple hardware interface, and a more elaborate transmission protocol.

For a simple, layman's explanation of what MIDI is, read What is MIDI?

The MIDI Specification is published by the MIDI Manufacturer's Association, ie, MMA (although this online document gives you the same information for free, in easier-to-understand language, and in many cases, with even more detail than the official document).