A TeX engine in the initial state ('IniTeX') knows only the primitives and a very small number of pre-defined settings. For almost all practical use you want a set of macros on top of this. That can be achieved by doing
tex -ini
and then typesetting them in interactively, but is much more practically achieved by having them saved into a file. You could read that file at the start of every run you did, so start your input with
\input mymaros\relax
or similar.
In most real cases this standard file will end with the primitive \dump: that ends the TeX run and saves the current state of TeX's memory so it can be reread later. Your 'real' document then does not ever need to worry about those pre-defined macros: they are loaded at start up from the dump file. Historically, you would have told TeX to read a dump using
tex &<dump-file-name>
so for example
tex &latex
for the LaTeX format (latex.fmt). However, you don't need to do that as the command latex is available as more-or-less equivalent to the same thing. (There are technical differences, and importantly a modern latex will be more akin to pdftex -output-format=dvi &latex.)
Note that a format file is a memory dump. As such, it is only usable by exactly the same binary that made it: same OS, same version, etc. As such, format files are not distributed, but are created on the system where they are used.
If you look at the LaTeX Team SVN you will find a variety of files concerned with the process of building and testing LaTeX for release. Our build system, l3build, does make format files for local use in testing. However, this is not the same as making a format file for a user. Indeed, the official release of LaTeX, like most other TeX software, is via CTAN, and we do not send the build system material there (users do not need it).
Most end users don't get material directly from CTAN in any case: they get LaTeX as part of a TeX system, likely TeX Live or MiKTeX. These systems do the format building and saving automatically, and users therefore very rarely need to be concerned with the detail.
pdflatexorlualatex). – Ulrike Fischer Jun 25 '15 at 13:05tex system will do it for you? What exactly will it do? i.e. how a format is created? – Alexandru Barbarosie Jun 25 '15 at 13:09pdflatex <filename>.texthen the pdfTeX engine will be used and the LaTeX format. If you saylualatex <filename>.texthen LuaTeX will be used with the LaTeX format. Roughly. – cfr Jun 25 '15 at 13:16pdftex --ini pdflatex.ini. This inputs the macros and outputs the pdflatex.fmt. All texsystems have scripts to create the standard formats (which explains why I'm not sure about the exact syntax -- it's long ago that I had to do it manually.) – Ulrike Fischer Jun 25 '15 at 13:16pdftex &formatname file. – Ulrike Fischer Jun 25 '15 at 13:35texmf-dist/scripts/texlive/fmtutil.pl? Other scripts in that directory may also be of interest. – cfr Jun 25 '15 at 13:48