LaTeX Source Document File
.tex files are used by the TeX typesetting system, most commonly with the LaTeX macro package.
These files contain instructions describing the precise layout and content of documents (usually scientific or technical) to be processed by TeX in order to output high-quality PDFs for printing and distribution.
Sometimes they're accompanied by .ltx files, which contain definitions and helper commands.
» LaTeX Editor
How to open .tex files?
Software to open .tex files
What are .tex files