Just about any motherboard made after 2000 will have some sort of S/PDIF output. You can tell by looking at the back of the motherboard where all the I/O stuff is located. The top orange RCA port is coaxial. That square port below it is optical.
For sound cards, this isn't always that obvious. Some have what's called a "mini-TOSLINK" port, which is a 3.5mm port (exactly like ones for headphone and microphone) that requires an adapter. You can find out if that's the case through a quick read of a card's specifications. Like motherboards, unless you're considering a sound card from before the PCI days or an el-cheapo USB sound card, almost any sound card made within the last 10-15 years will have some sort of S/PDIF output.
As for which to use, optical is generally preferred due to interference concerns. However, optical cables has a shorter maximum length and don't take sharp bends well.
Since you're outputting the sound digitally from your computer, the choice of sound card doesn't really matter. Even the on-board digital output is fine. Your HTS-GS1 will do the actual conversion from digital to analog so it can be played through your speakers. The choice of sound card only really matters if you're gaming on the PC. And even then, mostly for pre-Vista games. If that does apply to you, we've got a massive thread on that
EDIT: I forgot to address the HDMI input and TV optical out matter. Your TV's optical out will only output stereo even if the HDMI input has more audio channels. You can thank HDCP for that.Edited by HalidePisces - 11/16/12 at 6:53pm