\bye is the control sequence to end a TeX document.

Due to the fact that it is not allowed in TeX to end a document in internal vertical mode on introduced this macro. This macro is defined as

\def\bye{\par\vfill\supereject\end}

see also edit