To add a table of contents section to a LaTeX document use the command \tableofcontents. Add it at the location where you want the table. For example, to have a table of contents after the title:
\begin{document}
\end{document}