This Ableton Live walkthrough covers the full input-to-output routing setup for a MIDI track, starting with how to open the I/O section and working through every chooser in sequence.
On the input side, the first chooser sets which MIDI device feeds the track, with "All Ins" making it respond to any connected controller. The second chooser narrows that to a specific MIDI channel. The Monitor mode then determines how the track behaves: Auto arms the track for live input while still playing clips, while In disables clip playback and listens only to the external device.
On the output side, the audio generated by the MIDI track's instrument defaults to the Master channel, but can be rerouted directly to a specific output on your audio interface, bypassing the Master entirely. That's useful when you want to send a synth or instrument to a dedicated hardware output without it passing through your main mix bus.