Links in LibreOffice

Hows to create links in a file like, in the contents page of a file whenever i click on the some title it should automatically go to the page… Can somebody please help, its urgent.

When you create table of contents links are automatically added to it, just hold Ctrl while clicking on some title and it will take you to its location.