Page numbering can be toggled on / off from the Confluence editor toolbar. When you're editing a Confluence page, you will find the Numbered Headings button next to the heading selector.
When you click on the button, all headings on the page will be numbered.
If you don't want to use the default numbering format, you can change the configuration of the numbering. You can do so by opening the numbering configuration from the toolbar.
More information about the options in the configuration can be found under Formatting options: