The structure of a software program may be thought of as a "web" that is made up of many interconnected pieces. To document such a program we want to explain each individual part of the web and how it relates to its neighbours. The typographic tools provided by TeX give us an opportunity to explain the local structure of each part by making that structure visible, and the programming tools provided by languages such as C or Fortran make it possible for us to specify the algorithms formally and unambigously. By combining the two, we can develop a style of programming that maximizes our ability to perceive the structure of a complex piece of software, and at the same time the documented programs can be mechanically translated into a working software system that matches the documentation."
[Taken from the CWEB User's Manual, version 3.0 (1993)]
More technically, a WEB system consists of two processors, called WEAVE and TANGLE. They can be quite different, though, for different WEB environments. They both act on the WEB document in their own ways:
WEAVE "weaves" the document for a human reader, producing TeX output.
TANGLE "tangles" the document for a computer, producing a plain programming language file to be compiled, linked and executed [in CWEB and FWEB, the WEB document itself can be debugged since TANGLE automatically inserts "#line" labels for the debugger].
It must be emphasized that WEB and its variants are not the only environments for Literate Programming. See also other LitProg tools.
<marcus@x4u.desy.de>