When you flatten a MIDI track, which must first be frozen, it will render the audio with all of the plugins and the virtual instrument to an audio track. This commits to the project as an audio file rather than a MIDI file. This is useful when you've finished writing/recording a part on a MIDI track and want to treat it as audio, saving on the CPU.