You may well be wanting to connect your keyboard to your computer to record it.
So we need a physical connection from the MIDI OUT of the keyboard to the computer. To do this, the MIDI information saying what notes to play needs to get from the keyboard into the instrument software. These range from traditional keyboard instruments such as pianos, electric pianos, organs and synths, to percussive instruments such as drums, to orchestral instruments like strings, woodwind and brass.
MIDI keyboards can be used to play a multitude of software instruments inside your computer.