As Magus... said, the electrical signals for the video portion of HDMI and DVI outputs are identical. One main difference between these two standards is that HDMI includes audio among its several signals, whereas DVI (as originally designed) has no audio at all.
As a result, HDMI is widely used for video and audio from a variety of sources (PC's, DVD, Blu-Ray, Xbox, etc), whereas DVI originally was used mostly for video only from a PC to a LCD monitor. In such a system, any audio must be output from a separate audio output port / cable and connected to a sound system. For cases where the monitor has HDMI input but not DVI, you can get a simple adapter (plugs into the DVI output of the video card) that converts the connections so that you now have an HDMI output port on your vid card. ADDITIONALLY, some video card makers (began with ATI, copied by others) have used a "non-standard" DVI output system that adds stereo audio to the DVI port using exactly the same electrical signals as HDMI does. This requires that the vid card itself have its own audio chip built in, and it comes with its own driver so you can use it. Now, Windows only allows one audio output device to be used at a time, so you have to tell your Windows to use the vid card audio system, rather than whatever else you have, to get this to work. You also need a slightly different adapter to convert the DVI port to a HDMI port - the difference is that this adapter must specifically include connections for the non-standard audio signals to be passed on to the appropriate lines in the HDMI output connector. So, using such a adapter, you can get video (and maybe audio - depends on your card and adapter) from a DVI port to connect to an HDMI input port on your display device.
Bottom line: having an HDMI input on your LCD monitor AND having sound output included in the monitor (some don't do sound!) means you can connect many types of source device to your display and get both video and stereo audio. Then, whether your PC has HDMI or DVI (plus adapter) output ports, you can connect to that monitor, although using the DVI option you will get only video if your DVI is the original standard type. IF your DVI is the "non-standard" type that includes audio (plus the correct adapter), you can get both video and audio from that, just like HDMI.
Me? I've got both. This computer uses DVI for video only to my LCD monitor, and 5.1 channel audio outputs from mobo ports to a powered speaker system. Another comp used for TV in the living room uses an ATI-based video card with audio out in the DVI connector, plus an adapter, to connect to a LCD wide-screen with HDMI ports.