Piano rolls were paper tubes that made a player piano play a song. You would thread in one end of the paper roll -- kind of like an old film projector. As the paper fed through, little holes would tell the piano what notes to play. If you have ever seen the workings of a music box, it's the same idea. A rotating drum with little spines on it, plucks tuned metal fins, like a Kalimba.
MIDI files are basically digital piano rolls. They tell the computer or synthesizer, what notes to play. Where piano rolls had a limited amount of information they could relay; MIDI files contain a vast number of details including: instrument, pitch, channel, tempo, volume, attack, decay, and pitch bend. Even though MIDI files contain so much information, they are amazingly small.
Just like a piano roll will sound different on different pianos, a MIDI file will sound different on different equipment. A MIDI file has 16 channels and each channel is basically an instrument, with channel 10 always being reserved for percussion. Often MIDI files sound lousy, with whistles and odd banging, and that's usually because the 'drum kit' assigned is not available in your MIDI instruments -- kind of like when you load text, but don't have the right font and everything goes crazy. As with fonts, you can install additional instruments in your computer or hook up to different synthesizers or even tone generators like the Yamaha VL70-M. I compose and arrange using MIDI, but record the finished work to an audio file, (.wav or .mp3), so it plays the same for everyone. It's the same as writing and editing a word document then translating it to an electronic format (.pdf) for general consumption.