If your cable box is older with only a DVI output and your TV has an HDMI input, you do one of two things. First, you can get a cable with a DVI connector at one end and an HDMI connector at the other end. Second, you can buy a DVI to HDMI adaptor and plug this into your cable box DVI output. Then you can run a regular HDMI cable from the adaptor to the TV.
HDMI transmits video and audio both. However, DVI is only video. Therefore, in addition to the DVI to HDMI cable connection, you also have to use separate audio cables.
It does get confusing.