A TeX format is a prepared collection of definitions and initialization state used with TeX. A TeX format file, conventionally ending in
.fmt, stores internal structures so they can be loaded efficiently instead of reconstructed from the original initialization input.[ref]Plain TeX supplies one such foundation; LaTeX supplies another, with document-level conventions and facilities. The same mathematical input
$x^2$ can be embedded in either system, but an authoring command defined by one format need not be available in the other.Keeping the layers separate helps diagnose a failed document. The TeX implementation provides TeX primitives; the format makes further TeX macros and defaults available; a document invokes those definitions. Loading a different format can change the meaning or availability of commands without changing their spelling in the input file.
New to topics? Read the docs here!