TeX is a markup language for typography, designed by Donald Knuth. It allows detailed control over layout and is particularly strong in its capabilities for mathematical formulas. It includes a full programming language. The "X" in the name is properly pronounced like the Greek letter chi (or the German ch), though it's often pronounced as "tek."
TeX has a powerful macro facility, and several macro extensions of TeK, such as LaTeX, are widely used.