This is assuming you use USB, as most of us do. So if you want to record BOTH audio AND MIDI, you'll need a USB audio MIDI interface unit. Not all audio interface units have MIDI inputs and outputs. But what if you want to connect a keyboard to also record MIDI?
In order to get great sounding audio into your computer, you need a good audio interface.