TeX is a typesetting system written by Donald E. Knuth, who says in the Preface to his book on TeX (see books about TeX) that it is "intended for the creation of beautiful books - and especially for books that contain a lot of mathematics".
Knuth is Emeritus Professor of the Art of Computer Programming at Stanford University in California, USA. Knuth developed the first version of TeX in 1978 to deal with revisions to his series "the Art of Computer Programming". The idea proved popular and Knuth produced a second version (in 1982) which is the basis of what we use today.
Knuth developed a system of
'literate programming'
to write TeX,
and he provides the literate (WEB) source of TeX free of charge,
together with tools for processing the web
source into something
that can be compiled and something that can be printed; there's never
any mystery about what TeX does. Furthermore, the WEB system
provides mechanisms to port TeX to new operating systems and
computers; and in order that one may have some confidence in the ports,
Knuth supplied a test by
means of which one may judge the fidelity of a TeX system. TeX
and its documents are therefore highly portable.
TeX is a macro processor, and offers its users a powerful programming capability. For this reason, TeX on its own is a pretty difficult beast to deal with, so Knuth provided a package of macros for use with TeX called Plain TeX; Plain TeX is effectively the minimum set of macros one can usefully employ with TeX, together with some demonstration versions of higher-level commands (the latter are better regarded as models than used as-is). When people say they're "programming in TeX", they usually mean they're programming in Plain TeX.