How can you connect a computer to a TV?

Many new computers have either a DVI or an HDMI display port. These are the digital replacements to the 15 pin VGA connector that has been around for many years.
Almost all new televisions have an HDMI input. If the computer has an HDMI output, then a simple HDMI cable should carry both video and audio to the television.

If the computer has a DVI output, a DVI to HDMI cable can be used because the video element of HDMI is identical to the DVI signal. Unfortunately, DVI does not support audio so a separate cable will be needed for the audio signal. Because of the lack of audio support on DVI, most televisions have at least one HDMI input that has a separate analog audio input that is linked to the HDMI port.

Finally, there are a number of televisions that have VGA inputs and can accept VGA directly. Others have a set of five RCA or phono sockets normally marked as R, G, B, H, V. The five connectors will normally handle a VGA signal with the right adaptor cable.