Insert dots at the end of a phrase
To add the dots to your table of contents, select the table, choose the Text inspector, then select the leader as dots.

                                                  

If you don't have a table of contents, place the cursor where you wish to insert the table of contents, then Insert → Table of Contents and choose the scope.