Now that you have done the hard part of identifying what hardware your computer and your TV have, you'll be pleased to know that buying cords is really easy. You have found that your computer outputs
DVI and your TV accepts HDMI. DVI will not carry your audio from your computer to your TV and therefore you will need to buy a DVI to HDMI cable. Just go on your favorite electronics website (I prefer Amazon.com for service and price) and type in what you need. you can buy something like a DVI to HDMI Cable 6ft Male-Male for approximately $3.63 on Amazon. I know for a fact that the local corner store is three times the price.
For example: if your computer outputs DVI and your TV accepts HDMI, type into the search box, "DVI to HDMI cable". Since we told you DVI doesn't carry audio, you also need an audio cable from your 1/8-inch (3.5mm) computer stereo jack to your TV's RCA jack, so also search for "1/8 audio to RCA cable". Most people have this little cord lying around the house somewhere. I know sometimes, these little cables come with some MP3 players. I also use this cable 3.5 MM (1/8") Stereo Cable Male to Male 6 Feet - Connects iPod to audio input on home stereo or car stereo because it connects any MP3 player or iPod to a set of computer speakers and makes a stand-alone stereo.
If you have any trouble finding the right cable when trying to connect your computer to your TV, I highly recommend you write down all of the different outputs on your computer and the inputs on your TV and go down to the nearest electronics store. Give the list of outputs and inputs to the staff and they'll be happy to sell you exactly the parts you need to connect your computer to your TV. You can always use the shop assistant advice and then browse around on Amazon and read all the comments from previous buyers. These comments are very valuable and can stop you from making mistakes when buying your DVI to HDMI cable. Of course if the electrical shop has competitive prices and you are in a hurry to connect everything up and buy it then and there.