Now, I don't know what you're going to use the iPad with a MIDI for, but a marvelous program I use all the time is Music Studio Lite (free) and Music Studio ($14.99, USD).
It uses the share program so you can open up Music Studio from any app (say you have a MIDI file in Dropbox, you can use "Open In" to open it up in Music Studio). It'll also open other music files ... but that's not what you are looking for.
Then, you can export from the program (MIDI, .wav or .aac). You can export a song you've created. However, only the Pro version can do that.
I also like the app Notion ($14.99, USD). It's more of a score creator - but one of its cooler features is that you can import a MIDI file and it will create a score from it.
As you can see, these music program manipulators/players aren't cheap. But they sure are handy ... and fun!
I've never tried to hook up my iPad to my electronic piano keyboard, though that is one of the things I always mean to do. So, I'm of no help there, sorry.
Basically, it's as twerppoet says - the iPad can't do MIDI natively. But, I've found there are some seriously good apps out there. What you use is all dependent on what you need it for.
Hope some of this helps. And that I didn't go too far afield.
Marilyn