There's just one command necessary: \tableofcontents, as already mentioned by lockstep. It takes the entries from the sectioning commands \part, \chapter, \section etc.
Additionally, you could use the optional argument of a sectioning command to get a different, shorter entry for the table of contents, for example:
\section[short entry]{long title}
This is useful if you have very long titles in the body text but need shorter list entries in the table of contents.
There are package for further customization of the contents list, if desired, for example:
A very similar index could be created for your figures and tables. The commands are \listoffigures and \listoftables. I mention it because it's the same concept, here the content entries come from the \caption commands.