A MIDI file knows every note you played but nothing about how to write it down. We quantise it into bars, engrave it as a proper score, and give it back as something you can read, print or edit.
MIDI records when a key went down and when it came up, in milliseconds. Notation records what the note is — a dotted quaver, tied across a barline, in the second voice of the treble staff. Getting from one to the other is real work, and it is where most MIDI-to-score converters produce something technically correct and completely unreadable.
The main step is quantisation: snapping the recorded timings onto a rhythmic grid. A part played by hand is never exactly on the beat, and without this step every note gets written as an unreadable tangle of tied 64th notes. We quantise before engraving, then lay the result out on a grand staff.
Files exported from notation software or a sequencer come out close to perfect — the timing is already on the grid, so nothing has to be guessed. Files recorded live from a keyboard come out readable but imperfect: rubato, a rolled chord, or a deliberately late entry all get pulled onto the nearest beat, which is usually right and occasionally flattens something you meant.
Two things MIDI simply does not carry, so no converter can recover them: how a note should be spelled (a black key is written as A♯ in one key and B♭ in another — MIDI only says "key 70"), and articulation or dynamics beyond raw velocity. Expect a clean, accurate skeleton that you may want to tidy in MuseScore.