To make a table of contents, you need to mark each section of your document with a heading. To do this, highlight the appropriate text, and then select a heading size from the style menu in the toolbar.

To revert a heading to normal text, simply select the Normal option from the same drop down menu; doing so will also remove that link in the table of contents after you update the table of contents.
After you’ve marked each section with a heading, your document could look like this:

You can then add a table of contents from the Insert menu.

After you’ve added a table of contents, it will automatically create a link to each heading in your document.

As you update your document, you can easily update the table of contents by clicking the Update now button in the top right of the table of contents.