The very most important thing to understand about midi is that you can not hear it because it contains NO MUSIC OR AUDIO. Midi is purely just data and information. Midi Data tells devices what to do to make music.
There are basically three midi device types. There are midi sequencers that store the midi and then play back the data. There are midi controllers that are used to play other midi receiving devices or to send midi data to a midi sequencer for recording and playback. And finally there are midi devices that play music based on the midi data they receive.
For making beats or instrumentals you will need all three. Usually the software is the sequencer and instruments so you really just need a midi controller for playing the melodies to your songs for recording and playback. Most midi controllers hook up via USB for a very easy hook up. The USB connection supplies the power usually as well as transfer the midi data to the computer.
MPC’s are also midi sequencers as well as sample players. So you can store real sounds in them and play them back and you can sequence any keyboard or rack module that has sounds that can be played via midi notes. MPC’s are not necessary for making professional tracks though. They are just different computers.
Note that most audio interfaces also have midi in’s and out’s.