What code do I use for this action?

If I wanted to an onclick event on a text to open a page on the site?

You can either do it through the Wix Editor by simply selecting the text and adding a link to it for the other page.

Or you can simply use onClick function on the text and then use Wix Location to take your user to another page.
https://www.wix.com/corvid/reference/$w.Text.html#onClick
https://www.wix.com/corvid/reference/wix-location.html#to