Everything else being equal, the quality of your sound card and speakers will have the greatest effect on the quality of any audio played through your computer.
A sound card performs many functions, including analog-to-digital (A/D) and digital-to-analog (D/A) conversion, audio mixing, music synthesizing, sound effects generation, and amplification.
During playback, the digital signal must be converted to an analog signal, to drive headphones or feed an amplifier for speakers. This happens in a device called a digital-to-analog converter.
The components inside a computer generate a tremendous amount of electrical noise. This noise can be introduced into the audio signal whenever it is in an analog format. Poor shielding allows noise to leak into the signal, and low-quality D/A converters add distortion and even more noise.
The most important features for a basic sound card are good shielding and good digital-to-analog converters. Digital connectors are important if you want to interface with a digital device, such as a MiniDisc player or a stereo receiver that has digital inputs and outputs.