Splitting the input
A large document requires a lot of input. Rather than putting the whole input in a single large file, it’s more efficient to split it into several smaller ones. Regardless of how many separate files you use, there is one that is the root file; it is the one whose name you type when you run LaTeX.
See filecontents, for an environment that allows bundling an external file to be created with the main document.

\include
Synopsis:

\include{file}

If no \includeonly command is present, the \include command executes \clearpage to start a new page (see \clearpage), then reads file, then does another \clearpage.
Given an \includeonly command, the \include actions are only run if file is listed as an argument to \includeonly. See the next section.
The \include command may not appear in the preamble or in a file read by another \include command.

\includeonly
Synopsis:

\includeonly{file1,file2,...}

The \includeonly command controls which files will be read by subsequent \include commands. The list of filenames is comma-separated. Each file must exactly match a filename specified in a \include command for the selection to be effective.
This command can only appear in the preamble.

\input
Synopsis:

\input{file}

The \input command causes the specified file to be read and processed, as if its contents had been inserted in the current file at that point.
If file does not end in ‘.tex’ (e.g., ‘foo’ or ‘foo.bar’), it is first tried with that extension (‘foo.tex’ or ‘foo.bar.tex’). If that is not found, the original file is tried (‘foo’ or ‘foo.bar’).