A friend asked us once, “Should I use LaTeX or MiKTeX?” In various guises, this is a common question, seemingly innocent, but actually betraying a fundamental confusion about the levels of operation in the TeX world. As a further confusion, the word “TeX” can be used to refer to any of a myriad of items at any level. Starting at the top:
TeX source files can be typeset into several different output formats, depending on the engine. Notably, the pdfTeX engine (despite its name) can output both DVI and PDF files.
At a high level, the output format that gets used depends on the program you invoke. If you run latex (which implements the LaTeX format), you will get DVI; if you run pdflatex (which also implements the LaTeX format), you will get PDF.
To get HTML, XML, etc., output, the tex4ht program is commonly used. This utility uses TeX to do its job, but the TeX engines themselves do not implement HTML output.
ConTeXt is a special case, straddling levels. It contains a format at the level of plain TeX and LaTeX, but unlike the other formats, it is invoked via a separate utility (e.g., texmfstart) which then indirectly runs a TeX engine. This makes it possible to support a wide array of advanced features, such as integrated graphics and XML input, since the startup utility can control the flow of processing.
Of course, this short web page is only a brief introduction to the basics. Here are some pointers to further information.