If you have digital outputs and inputs, use those. Better sound. (SPDIF or Coax/orange RCA)
If you have RCA outputs on the soundcard and the stereo just use RCA cables.
If you have 3.5mm mini-jack on the sound card and RCA on the stereo use a 3.5mm mini-jack to RCA cable like this:
or this:

you can get them at Wal-mart or RadioShack for 3 or 4 bucks.
if you have only 3.5mm mini-jack on both... well you need to find out what the hell the mini-jack is on the stereo side. A lot of older stereos and even some newer ones have these mono mini-jacks for AM radio, phonos and remote control sensors. Don't use these as either A you get mono sound, or B you are interfering with an input not meant for sound.
ripping apart ear bug cables might work. Depending on the ear bud cable. In the end though the sound quality will be really shitty. Main reason is the cables ground is crap and so small it is hard for you to split the lead and ground apart and make a clean connection. Why waste the time when you could just get the cable for 3 bucks.
[NOTE]
Analog connectors are uni-directional. Meaning they send information only one direction. Due to them being analog it can't tell the difference of the kind of input you've used. Make sure you hook into the correct connector by reading the manuals for each devise... so as not to destroy your equipment.
