Midi files are nothing more than a set of instructions that tell your keyboard or other sound source what to do. They are easily edited, transposed, etc.
There is a more or less accepted format for them, called General Midi, where certain sounds or groups of sounds are assigned to selected channels. For example drums are on 10, and sometimes 9, bass on 2, lead instrument, if any, is on 4 etc. It is not mandatory to use the GM format, but it makes it easier to work with if you have an idea of what sounds will be called up from what channels.
There are also expanded formats such as Yamaha's XG, Korg's GS... that are tailored to work best with their sound banks.
There are lots of better explanations on the internet, but this should give you an idea.
MP3s are compressed recordings of sounds. Some instruments can now transpose them to a degree. They really can't be edited though. The sounds that were originally recorded are what you get! WAV format is where most of them start, and they are compressed by the MP3 format to save space, since WAV files are really large in comparison. If you use a fairly high MP3 rate of compression, say 320, then it's hard for most ears to tell the difference in sound from the original file.
I record most of my performances in WAV format, then, if I wish to share them over the internet, compress them into MP3s. There are lots of free programs to convert them from WAV to MP3. They cannot be converted the other way to regain the original quality, so I always save the original recording in case I want to burn it to CD and get the best quality sound.
Hope this helps.
Edit: I see I cross-posted with Rosetree, but they replies are saying the same thing; I'm just longer-winded!